Dates 1 day/week/etc. ago are sometimes plural
scottblechman opened this issue · 1 comments
Environment:
Extension version: 2.1.4
Chrome version: 93.0.4577.63
Error:
The date since a post/comment was created is sometimes spelled with a plural when the number is 1 (ex. "1 weeks" vs "1 week"). This happens when the time interval between the timestamp and now is at least 1 but not yet 2, for example 10 days being at least a week but not yet 2 weeks. This was also tested on dates measured in hours, months, and years.
How to reproduce:
Open any reddit post to a YouTube link that was created at least 7 days ago but not 14 or more.
A reproducible example can be found here. I used a hardcoded date instead of Date.now() to keep it consistent; the dates are around 10 days apart.
Thanks for posting this issue. I have fixed it and it will be in production soon.