hustcc / hustcc/timeago.js

Incorrect future approximation?

Open
#236 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.4k
Forks
404
PR merge metrics
No merged PRs in 30d

Description

Today is January 19 2021, when I do `format('2023-01-19T14:23:07.418Z', 'en_US')`, which is exactly 2 years (minus some minutes), the rendered result is "1 year" instead of "2 years".

Most likely, this is because the current time (hours/minutes) is after 14:23, so it's actually 1 year, 364 days, 20 hours. I think this should be "rounded" to 2 years rather than 1 year, but perhaps this is a judgement call.

Super curious to hear your opinion!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.