Converts personal identification codes from various countries into birthdate.
- Automatic Birthdate Extraction: Effortlessly extracts birthdates from national ID codes.
- Built-in Validation: Confirms personal code validity using checksum verification before returning a date.
- Country-Agnostic: Automatically identifies and processes the country format, requiring no additional parameters.
- Lightweight & Seamless Integration: Designed for easy integration into any project with minimal setup.
- Date Range Restriction: Only supports personal codes issued from 1900 to the present. Future-dated codes are not currently supported.
npm install @remato/personal-code-to-birthday
const birthday = personalCodeToBirthday('39309262855')
console.log(birthday) // outputs { day: 26, month: 9, year: 1993 }
- 🇺🇦 Ukraine
- 🇪🇪 Estonia
- 🇱🇻 Latvia
- 🇱🇹 Lithuania
- 🇵🇱 Poland
- 🇫🇮 Finland
- 🇸🇪 Sweden
- 🇳🇴 Norway
- 🇩🇰 Denmark
- 🇷🇴 Romania
Need support for a new country or have feedback? Create an issue.
- In Ukraine, the first five digits of the code indicate birthdate as days since January 1, 1900
- Lithuania and Estonia use a nearly identical personal code system.
- Estonia's personal code used to include hospital where the person was born.
- Denmark dropped the check digit in 2007 due to running out of available numbers.
- Latvia removed the birthdate component from their new personal codes starting in 2017.
- In Sweden, individuals who turn 100 receive a new personal code, where “-” is replaced by “+”.
- Norway plans to remove gender and century indicators from personal codes in 2032.
- Finland’s personal codes include both numbers and letters for the checksum.
- Romania’s personal code includes a county indicator.
- Poland’s system differentiates centuries by altering the month digits.
Created by the Remato team to auto-complete birthdate entries based on the construction worker’s personal ID input (country unknown).