Simple package to validate Sri Lankan NIC number
Via Composer
$ composer require softhublk/sl-nic-number
<?php
require 'vendor/autoload.php';
use Softhub\SlNicNumber\Nic;
$nic = new Nic('991234567v');
echo 'NIC Type' . $nic->getCategory()->value . '<br>';
echo "Gender : {$nic->getGender()->value} <br>";
echo "Date Of Birth : {$nic->getDateOfBirth()->format('Y-m-d')}<br>";
echo 'Born day of the year ' . $nic->getBornDayOfTheYear() . '<br>';
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email avantha.nimna@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.