Closed kevinswartz closed 3 years ago
Hi @kevinswartz,
Thank you for the report.
Our SDK returns this Date type, months start from value 1. January -> 1, February -> 2, ...
We will add this information to the Date type documentation.
You can prepare the month value (subtract 1), before sending it to the momentjs.
Ok, thanks for the information! That is what I implemented. You might consider renaming your date object to something else to make this more obvious?
Hi Guys, Thanks for your help with this library!
I'm seeing an issue with the dates I get back from scanning both passports and drivers licenses right now. I'm using blinkid-react-native v5.8.0. It looks to me that the months I get back are off by 1.
Here's a portion of a response for a Passport scan:
On the passport, I can see that the date of birth is indeed 3/31/1983. However months in Javascript are zero-based, so this date actually indicates 4/31/1983, which is not a valid date. This is a problem if I pass this date object into something like momentjs. I'm seeing this for dateOfBirth, and dateOfExpiry for US passports and Drivers Licenses.