Latest | 1.9 |
---|---|
Homepage | https://github.com/hyperoslo/HYPNorwegianSSN |
License | MIT |
Platforms | ios 6.0, requires ARC |
Frameworks | Foundation |
Authors |
A convenient way of validating and extracting info from a Norwegian Social Security Number
Reference 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];
}
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Credits
Hyper made this. We’re a digital communications agency with a passion for good code,
and if you’re using this library we probably want to hire you.
License
HYPNorwegianSSN is available under the MIT license. See the LICENSE file for more info.
Latest podspec
{ "name": "HYPNorwegianSSN", "version": "1.9", "summary": "A convenient way of validating and extracting info from a Norwegian Social Security Number", "description": " * A convenient way of validating and extracting info from a Norwegian Social Security Numbern", "homepage": "https://github.com/hyperoslo/HYPNorwegianSSN", "license": { "type": "MIT", "file": "LICENSE.md" }, "authors": { "Hyper Interaktiv": "[email protected]" }, "social_media_url": "https://twitter.com/hyperoslo", "platforms": { "ios": "6.0" }, "source": { "git": "https://github.com/hyperoslo/HYPNorwegianSSN.git", "tag": "1.9" }, "source_files": "Source/", "frameworks": "Foundation", "requires_arc": true }
Fri, 04 Mar 2016 16:11:03 +0000