You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pre 2001 Dates throws Out of Range Error when using params #1599
Problem description
I'm using TypeOrm in a project and it all of a sudden started to fail to update with pre 2001 dates. I can see in the commit for 16.7.0 (19cb073) that the unit tests expect it to fail for 2000-12-31 (test/unit/data-type.js lines 218, 323, 388). There is an issue with the min date. I'll see if I can fix it, but wanted it out here at least in the meantime.
It appears that 'January 1, 0001' is being parsed as 2001. It's all over the board what Date is parsing things as though. Passing in integer values returns 1901 🤷. I've been using Dayjs now for a while, I'll need to refresh myself.
Activity
arthurschreiber commentedon Feb 7, 2024
Hey, thanks for reporting this! ❤️
@MichaelSun90 will also look into it, in case you don't have the time to dig into the source code.
joseph-vandenberg commentedon Feb 7, 2024
It appears that 'January 1, 0001' is being parsed as 2001. It's all over the board what Date is parsing things as though. Passing in integer values returns 1901 🤷. I've been using Dayjs now for a while, I'll need to refresh myself.
github-actions commentedon Feb 9, 2024
🎉 This issue has been resolved in version 16.7.1 🎉
The release is available on:
Your semantic-release bot 📦🚀