Skip to content
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

Incorrect future approximation? #236

Open
AnandChowdhary opened this issue Jan 19, 2021 · 1 comment
Open

Incorrect future approximation? #236

AnandChowdhary opened this issue Jan 19, 2021 · 1 comment

Comments

@AnandChowdhary
Copy link

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!

@matheusbaumgart
Copy link

Have the same issue in hours, which is preventing me from using this awesome lib.
Here is the issue: If the time is 2:01 and there is an "event" at 4:00 it will say: in 1 hour.
Assuming because it's actually 1h and 59min until the "event". Since minutes are not shown, the estimation is misleading.

How do I show the minutes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants