Personnummer class
Constructors
-
Personnummer(String pin, {bool allowCoordinationNumber = true, bool allowInterimNumber = false})
-
Personnummer constructor.
Properties
-
age
↔ String
-
Personnummer age.
getter/setter pair
-
century
↔ String
-
Personnummer century.
getter/setter pair
-
check
↔ String
-
The last number of the personnummer.
getter/setter pair
-
day
↔ String
-
Personnummer day.
getter/setter pair
-
fullYear
↔ String
-
Personnummer full year.
getter/setter pair
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
month
↔ String
-
Personnummer month.
getter/setter pair
-
num
↔ String
-
Personnummer first three of the last four numbers.
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
sep
↔ String
-
Personnummer seperator.
getter/setter pair
-
year
↔ String
-
Personnummer year.
getter/setter pair
Methods
-
format([bool longFormat = false])
→ String
-
Format Swedish personal identity numbers to official format.
-
getAge()
→ int
-
Get age from a Swedish personal identity number.
-
getDate()
→ DateTime
-
Get date from a Swedish personal identity number.
-
isCoordinationNumber()
→ bool
-
Check if a Swedish personal identity number is a coordination number or not.
Returns
true
if it's a coordination number.
-
isFemale()
→ bool
-
Check if a Swedish personal identity number is for a female.
Returns
true
if it's a female.
-
isInterimNumber()
→ bool
-
Check if a Swedish personal identity number is a interim number or not.
Returns
true
if it's a interim number.
-
isMale()
→ bool
-
Check if a Swedish personal identity number is for a male.
Returns
true
if it's a male.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
parse(String pin, {bool allowCoordinationNumber = true, bool allowInterimNumber = false})
→ Personnummer
-
Parse Swedish personal identity numbers.
Returns
Personnummer
class.
-
valid(String pin, {bool allowCoordinationNumber = true, bool allowInterimNumber = false})
→ bool
-
Validates Swedish personal identity numbers.
Returns
true
if the input value is a valid Swedish personal identity number