Giter VIP home page Giter VIP logo

php-rijksregisternummer's Introduction

Rijksregisternummer / Numéro de Registre National

Social Legal Release Tests Code
Gitter License Latest Stable Version Build Status
Code Coverage
Scrutinizer Code Quality

Detailed information about identification number of the National Register (NL: rijksregisternummer, FR: numéro de registre national) can be found at:

Usage

Validating a national registry number

Validate check digits and whether the first digits form a valid date.

echo RijksregisternummerHelper::isValid('66041066600'); // true
echo RijksregisternummerHelper::isValid('66041066601'); // false

Extract the date of birth from a registry number.

echo RijksregisternummerHelper::getBirthDay('66.64.10-666.92'); // '1966-04-10'
echo RijksregisternummerHelper::getBirthDay('40.00.01-001.33'); // null

Also constructing a new Rijksregisternummer will throw a \UnexpectedValueException if the number is invalid.

Formatting a national registry number

Use the Helper to do simple string formatting. Invalid numbers will be returned as is.

echo RijksregisternummerHelper::format('66041066600'); // '66.04.10-666.00'

Or create an instance.

$rijksregisternummer = new Rijksregisternummer('93051822361');
echo $rijksregisternummer->humanFormat(); // '93.05.18-223.61'

Clean formatting characters from user input.

echo RijksregisternummerHelper::clean('66.04.10-666.00'); // '66041066600'

License

The project is licensed under the MIT license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.