RsaIdParser class

Parse South African ID numbers into an object with properties, i.e, date of birth, sex, race, etc.

Constructors

RsaIdParser.parse(String idNumber)
idNumber is the 13-digit South African ID number. Throws an exception if the ID number is not valid.

Properties

citizenship Citizenship
an enum to indicate if you were born in South africa or not
latefinal
dateOfBirth DateTime
DateTime object representing the date of birth, extracted from the first 6 characters of the ID number
latefinal
hashCode int
The hash code for this object.
no setterinherited
idNumber String
final
isValid bool
this property user RsaIdValidator class to validate an id number
latefinal
race int
returns 8 always, since race is not longer used
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sex Gender
latefinal

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited