HYPNorwegianSSN 1.10.2

HYPNorwegianSSN 1.10.2

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布上次发布2015年5月

Christoffer WinterkvistElvis Nuñez维护。



验证和提取挪威社会保障号码信息的一种方便方法

参考http://www.kith.no/upload/5588/KITH1001-2010_Identifikatorer-for-personer_v1.pdf

HYPNorwegianSSN *ssn = [[HYPNorwegianSSN alloc] initWithString:@"xxxxxxxxxxx"];

if (ssn.isValid) {
    NSLog(@"Yeap, this is valid alright, tell me more about this so called person.");
    [self gainInterest:YES];
}

// Or the shorthand version

if ([HYPNorwegianSSN validateWithString:@"xxxxxxxxxxx"]) {
    NSLog(@"Yeap, this is valid alright, tell me more about this so called person.");
}

if (ssn.isDNumber) {
    NSLog(@"OMG! A potential swede");
    [self runAndHide];
}

if (ssn.isFemale) {
    NSLog(@"Oh, it's a woman!");
    [self comesBack];
}

NSLog(@"Are you sure? Remember what happened last time?");

if (!ssn.isMale) {
    NSLog(@"Yeah I'm sure, this is not an Aerosmith song!");
    [self startWhistlingOnTune:@"Aerosmith -  Dude (looks like a lady)"];
    NSLog(@"Doh!");
}

if (ssn.age >= 18 && ssn.age < 35) {
    NSLog(@"Dear diary, jackpot");
    [self enableTheSmoulder:YES];
}

贡献

  1. 分叉它
  2. 创建您的功能分支(git checkout -b my-new-feature
  3. 提交您的更改(git commit -am 'Add some feature'
  4. 推送到分支(git push origin my-new-feature
  5. 创建新的Pull Request

鸣谢

Hyper制作了这个。我们是一家热衷于编写优秀代码的数字通信机构,如果您使用这个库,我们可能想聘请您。

许可证

HYPNorwegianSSN在MIT许可证下可用。有关更多信息,请参阅LICENSE文件。