The day of month of the birth of the person whose PIC this is.
The day of month of the birth of the person whose PIC this is. It is not a typo that this method is called 'birthDay', not 'birthday'. They are different concepts: this contains only the day of month, whereas the concept of 'birthday' includes the whole date.
Examples:
>>> Pic.fromStringU("070377-281V").birthDay 7 >>> Pic.fromStringU("211114A664E").birthDay 21
The birth month of the person whose PIC this is.
The birth month of the person whose PIC this is. 1-based representation, so January is 1 and December is 12.
Examples:
>>> Pic.fromStringU("070377-281V").birthMonth 3 >>> Pic.fromStringU("211114A664E").birthMonth 11
The birth year of the person whose PIC this is.
The birth year of the person whose PIC this is.
Examples:
>>> Pic.fromStringU("070377-281V").birthYear 1977 >>> Pic.fromStringU("211114A664E").birthYear 2014
Equals is true if the canonical string representation matches.
The Gender of the person whose PIC this is.
The hashCode() function of Pic only delegates the call to value.
The canonical string representation of the PIC.
The canonical string representation of the PIC. Usually the same String which was used to create this object.
Example:
>>> Pic.fromStringU("070377-281V").toString 070377-281V
the canonical string representation of the PIC.
The PIC String used to create this Pic object itself, trimmed and in uppercase.
The PIC String used to create this Pic object itself, trimmed and in uppercase.
Examples:
>>> Pic.fromStringU("070377-281V").value 070377-281V >>> Pic.fromStringU("211114a664e").value 211114A664E
PIC = Personal Identity Code, "henkilotunnus" in Finnish.
See https://vrk.fi/en/personal-identity-code1 for specs.
The constructor is private on purpose, so that Pics can only be created via the companion object (the so called "smart constructor" pattern). This prevents instances which are in an illegal state. Every Pic object can thus be treated as a valid Pic.
See the companion object for how to create instances of Pic.
Some examples of Pic creation: