This library is a collection of functions dealing with finnish specific identification numbers.
- hetu -- Check finnish HETU numbers
Simplest way to install is to use npm, just simply npm install fin-id.
- Mux F-productions
- Jaakko-Heikki Heusala jheusala@iki.fi
MIT-style license, see INSTALL.txt.
Each feature is a property:
var hetu = require('fin-id').hetu;
See examples/ for full examples.
The call hetu.check(hetu) returns true if the argument is valid ID:
if(hetu.check('010171-1234')) console.log("valid");
else console.log("invalid");
The call hetu.parse(hetu) returns an object with additional information:
var parsed = hetu.parse('010171-1234');
if(parsed) {
console.log("birthday is " + parsed.date()); // Fri, 01 Jan 1971
console.log("sex is " + parsed.sex()); // 'female'
}
- Finnish y-tunnus and VAT number: See Y-tunnus (finnish)