South African ID Number Algorithm
h1. South African ID Number Algorithm
A JavaScript algorithm to determine if a South African ID number is valid.
h2. Features
* Returns a object with the Valid , Date Of Birth and Gender details.
h2. Usage
// check ID number
var identity = getSAID("xxxxxxxxxxxxx");
if (identity) {
// returns a object if valid
alert(
"Valid: " + identity.valid +
"\nDate Of Birth: " + identity.dob +
"\nGender: " + identity.gender
);
} else {
// otherwise returns false
alert("ID number is invalid.");
}
h2. Change Log
h3. Version 1.0
* First official release