-
Notifications
You must be signed in to change notification settings - Fork 171
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
Wrong human text #250
Comments
Same issue on https://github.com/grayjoking/backhand (flagged up by user): |
Here’s a test case that illustrates the issue: --- a/test/relative-time.js
+++ b/test/relative-time.js
@@ -2411,18 +2411,18 @@ suite('relative-time', function () {
expected: 'in 3 years',
},
{
- reference: '2022-12-31T12:00:00.000Z',
- datetime: '2024-03-01T12:00:00.000Z',
- tense: 'future',
- format: 'micro',
- expected: '3y',
+ reference: '2023-02-18T19:00:00.000Z',
+ datetime: '2021-02-02T20:49:31.000Z',
+ tense: 'past',
+ format: 'auto',
+ expected: '2 years ago',
},
{
- reference: '2021-04-24T12:00:00.000Z',
- datetime: '2023-02-01T12:00:00.000Z',
- tense: 'future',
- format: 'micro',
- expected: '2y',
+ reference: '2023-02-18T19:00:00.000Z',
+ datetime: '2021-01-23T09:28:06.000Z',
+ tense: 'past',
+ format: 'auto',
+ expected: '2 years ago',
},
]) Output:
Might be related to #249? cc @keithamus |
I have a refactor PR that’ll be ready soon which will resolve these without regressing the other cases we’ve run into. |
@keithamus currently I am trying to dive into the code. Could you please point me to the PR with the refactoring? |
I did some work on trying to create a polyfill for Temporal Durations so we could move to those but the work stalled due to the complexity of the Temporal APIs. I don't have an active branch or PR so the current code is the latest iteration. |
I'm supposing this is the code that writes dates on Github web front.
1 year ago, it writes "2 years ago"
The text was updated successfully, but these errors were encountered: