This package is abandoned and no longer maintained. No replacement package was suggested.

A tool for validating Danish CPR-numbers

1.0.1 2018-01-31 12:47 UTC

This package is auto-updated.

Last update: 2020-04-16 12:12:13 UTC


README

Build Status FOSSA Status

A tool for validating Danish CPR-numbers, determining gender and calculating birthday. Almost any CPR-numbers can be validated with modulus 11, which this tool does. As of 2007, some CPR-numbers might return invalid, due to the lack of available CPR-numbers on some given dates.

Installation

Install it using composer

composer require niclashedam/cpr

Usage

Just include it and instantiate the CPR class.

use NiclasHedam/CPR;

$cpr = new CPR("2412958899");
var_dump($cpr->valid());

See exampes/example.php for more examples

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

Released under the MIT license

FOSSA Status