Skip to content

Java-bibliotek for validering og representasjon av norske fødselsnummer (personnummer).

Notifications You must be signed in to change notification settings

andrel/person_norway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Norwegian "Fødselsnummer" representation and validation.

"Fødselsnummer" is a the norwegian National Identification number.

It consists of a date of birth, an individual number and two check digits.

This project aims to provide basic utility methods for validating and extracting information about these numbers.

For definition, see Forskrift om folkeregistrering

Example use

Validate a string-representation.

boolean isValid = Fodselsnummer.isValid("12345678912");

Create an object representing a fødselsnummer.

Fodselsnummer fNr = Fodselsnummer.valueOf("12345678912");

Access properties of a fødselsnummer.

fNr.isMale();
fNr.toString();
fNr.getBirthYear4Digit();
fNr.getBirthYear2Digit();
fNr.getMonth();
fNr.getDay();

About

Java-bibliotek for validering og representasjon av norske fødselsnummer (personnummer).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages