Module

Hetu

Package
purescript-hetu
Repository
je-l/hetu

#Hetu Source

type Hetu = { birthday :: Date, id :: Int }

Valid hetu. Id is kind of like a serial number.

#parseHetu Source

parseHetu :: String -> Either String Hetu

Parse and validate finnish national identification number "henkilötunnus".

#formatHetu Source

formatHetu :: Hetu -> String

Render hetu in the traditional "ddmmyytnnnc" format.

#isTemporary Source

isTemporary :: Hetu -> Boolean

Hetus with id >= 900 are considered "temporary". See https://en.wikipedia.org/wiki/National_identification_number#Finland

#gender Source

gender :: Hetu -> Gender

Even hetu id is given for females and odd for males.

#Gender Source

data Gender

Constructors

Instances

Modules
Hetu