Converts a 10-character Old Sri Lankan NIC (9 digits + V/X) into a 12-digit New NIC. Format: 19YY + DDD + 0 + SSS + C Example: 921234567V -> 199212304567
Old-format NIC (9 digits + V/X).
Optional
Optional { referenceDate } used for age and future-date checks. Defaults to today.
{ referenceDate }
The equivalent 12-digit NIC, or null if the input is not a valid old-format NIC.
null
convertOldToNewNic('921234567V'); // '199212304567' Copy
convertOldToNewNic('921234567V'); // '199212304567'
Converts a 10-character Old Sri Lankan NIC (9 digits + V/X) into a 12-digit New NIC. Format: 19YY + DDD + 0 + SSS + C Example: 921234567V -> 199212304567