Codes are given as atoms or strings.
?- lt_personal_code("33309240064").
true.
?- lt_birth_date('33309240064', D).
D = date(1933, 9, 24).
?- lt_iban("LT12 1000 0111 0100 1000").
true.
A valid check digit only proves that a code is well formed, not that it
was issued to anyone.
- author
- - KokybiskaSvetaine.lt, https://kokybiskasvetaine.lt/
- license
- - MIT
- lt_personal_code(+Code) is semidet
- True when Code is a valid personal code (asmens kodas): 11 digits,
a valid birth date unless the code starts with 9, and the check
digit.
- lt_birth_date(+Code, -Date) is semidet
- Date is the birth date in a personal code as
date(Year, Month, Day).
Fails when the code has no valid date; codes that start with 9 carry
none.
- lt_company_code(+Code) is semidet
- True when Code is a valid company code (juridinio asmens kodas): 9
digits with a check digit.
- lt_vat_number(+Code) is semidet
- True when Code is a valid VAT number (PVM mokÄtojo kodas): 9 or 12
digits, with or without the LT prefix.
- lt_iban(+Code) is semidet
- True when Code is a Lithuanian IBAN: 20 characters, the LT prefix
and the MOD-97 rule. Spaces and dashes are ignored.