heavybeard / codice-fiscale

Javascript object for managing the italian tax code
http://heavybeard.github.io/codice-fiscale/
MIT License
9 stars 4 forks source link

Day is not correctly padded when it only has one digit #2

Closed Erenor closed 6 years ago

Erenor commented 6 years ago

Replacing line

day = day.toString().substr(day.length - 2, 2);

with

day = ('00'+day.toString()).substring(day.toString().length);

correctly pads the number and returns a correct Taxcode

heavybeard commented 6 years ago

Hi @Erenor , thanks for your feedback and your quckly fix. Can you create e PR?

Thanks again

Erenor commented 6 years ago

Hello. I tried to push into Development, to create a pull request, but it says that I cannot push: "Authentication failed. You may not have permission to access the repository or the repository may have been archived".

Should I fork to a new branch?

Thank you, Erenor.

heavybeard commented 6 years ago

Yeah, you need to create a fork of my repo to create e PR

Erenor commented 6 years ago

PR made :-)

heavybeard commented 6 years ago

Merged. Thanks @Erenor !!!