invidious
invidious copied to clipboard
[Bug] "Shared X ago" display is sometimes offset by one month
Describe the bug The line saying "shared x ago" under videos (on a channel's page) are offset by one month. This seem to happen only to videos that are exactly between 2 and 3 months old.
Steps to Reproduce
- Search for a two months old video
- Shows "shared 1 month ago"
Screenshots
On one specific video, that is a little over two months old:
On a channel that posts a video every two days, we can clearly see the jump:
This seems to be caused by the assumption that a month has 30 days in utils.cr: https://github.com/iv-org/invidious/blob/b7eba3bc178b76a733a142f475cdb83921d591c1/src/invidious/helpers/utils.cr#L214-L215
This seems to be caused by the assumption that a month has 30 days in utils.cr [...]
I don't think so. If that was the issue, we would be able to properly see the "2 months ago" mark after 60 days. But the issue I describe is that "2 months ago" never shows up.
This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.
I need to check on that.