jakub-onderka / birth-number
Library for validating and formatting Czech and Slovak birth numbers.
Installs: 38 460
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-12-16 16:25:33 UTC
README
Library for validating and formatting Czech and Slovak birth numbers.
Instalation
Via composer:
{ "require": { "jakub-onderka/birth-number": "1.0.0" } }
Usage
$birthNumber = new BirthNumber('736028/5163'); var_dump($birthNumber->getYear()); // 1973 var_dump($birthNumber->getMonth()); // 10 var_dump($birthNumber->getDay()); // 28 var_dump($birthNumber->getExtension()); // 516 var_dump($birthNumber->getChecksum()); // 3 var_dump($birthNumber->hasValidDate()); // true var_dump($birthNumber->hasValidChecksum()); // true var_dump($birthNumber->isValid()); // true var_dump($birthNumber->getGender()); // female var_dump($birthNumber->toString()); // 736028/5163