-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feb 29th showing as 'yesterday' on March 31 #281
Comments
Might be related: https://twitter.com/depoulo/status/1620703935186231302 |
May be the library or the component handling the relative-time is not updating it correctly instead we can a create a custom script to handle the time Am i correct mam/sir? |
Bug is reproducible on GitHub today: currently it's
It only happens when the current date is near the end of a month. It looks like all subsequent dates after the point where it breaks are off by 1 month. |
It happens because of JavaScript date math and the reliance on difference between
I've got a patch cooked up to fix this anomaly by correcting "May 31 minus 1 month" to be equal to "April 30" rather than "May 1". I don't know if that is semantically what is desired by this library, but I've never touched or used this library before really so I don't know very well what would be "expected" outputs |
I've opened #285 to fix this behavior |
Minimal reproduction:
Screenshot from 2024-03-31 at 6:03 PM, GMT +11
This appears the same on Firefox for Android, Firefox on Linux Mint, Firefox on Windows 10, and Edge on Windows 10.
The text was updated successfully, but these errors were encountered: