jakub-onderka/birth-number

Library for validating and formatting Czech and Slovak birth numbers.

1.0.0 2013-09-10 18:03 UTC

This package is not auto-updated.

Last update: 2024-11-04 15:36:09 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

Build Status