byrokrat / id Goto Github PK
View Code? Open in Web Editor NEWData types for swedish personal identity and corporation id numbers.
License: The Unlicense
Data types for swedish personal identity and corporation id numbers.
License: The Unlicense
SwedbankTyp2 accounts can have variable lenghts. tostring() does not take this into account...
Unvalid dates are automatically transform by DateTime. We should throw an Exception instead.
$id = new PersonalId('001301-0004');
echo $id->format('ymd');
// prints 010101
// should throw exception since 13 is not a valid month
As the lib stands this checkdigit must be manually removed. Let's validate it and print it when requested..
The following formats should be supported
Should work for all id-types.
Missing:
ICA Banken
Länsförsäkringar Bank
Danske Bank
Skandiabanken
Handelsbanken
Nordea - plusgiro
Sparbanken Örseund
Sparbanken Syd
2018 will see ver 2.0. Here is the todo list
This should be possible
if ($id->getSex() == PersonalId::SEX_MALE) ...
And this
$id->isMale()
$id->isFemale()
$id->isThridSex()
To bc define constants as
const SEX_MALE = 'M';
const SEX_FEMALE = 'F';
const SEX_OTHER = 'O';
$f = new iio\stb\ID\FakeId('19450415-xxxx');
echo $f;
// prints 19450415-xxxx, should be 450415-xxxx
$f = new iio\stb\ID\FakeId('450415-xxxx');
echo $f->getDate()->format('Ymd');
// prints 20450415, should be 19450415
Should support the DateTime->format syntax for formatting the date part.
Should work with all id types, including corporate and coordination.
Should add formatting options for delimiter, checkdigit and so forth.
Should support adding non-formatting characters to format, such as filling 0's or spaces.
See ledgr/autogiro/Builder/ConsentBuilder for use cases.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.