This is used to find the date, month, and birth year in a National ID number.
- Description:
This is used to find the date, month, and birth year in a National ID number.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
identityNumber |
string | This can be used to add a new national ID number to the birthday object. It will be executed only if the validity test is passed and if an invalid ID number is entered, the corresponding exception will be executed. In case of a new entry, use 'exception handling techniques' or use the 'validation' module to enter with prior validation. |
Classes
Methods
(inner) getBirthYear() → {int}
- Description:
This can be used to get the ID card holder's year of birth.
- Source:
Throws:
-
Unexpected result. method or function response is not valid. Please re-check your code and data. - If an inconsistent result is output.
- Type
- TypeError
Returns:
Birth year of ID card holder.
- Type
- int
(inner) getDay() → {int}
- Description:
Output the day of birth of the ID card holder.
- Source:
Returns:
Birth day.
- Type
- int
(inner) getDayName() → {string}
- Description:
Name suitable for the day of birthday. eg:- Sunday, Monday
- Source:
Returns:
Day name.
- Type
- string
(inner) getDays() → {int}
- Description:
The date of birth of the ID card holder and the number of days from the first day of January in the year of his birth.
- Source:
Throws:
-
Unexpected result. method or function response is not valid. Please re-check your code and data. - If an inconsistent result is output.
- Type
- TypeError
Returns:
The total number of days between the birth year of the ID card holder and the date of birth on January 1.
- Type
- int
(inner) getMonth() → {int}
- Description:
Output the month of birth of the ID card holder.
- Source:
Returns:
Birth month.
- Type
- int
(inner) getMonthName() → {string}
- Description:
Output the month name of birth of the ID card holder.
- Source:
Returns:
Birth month name.
- Type
- string