-
Notifications
You must be signed in to change notification settings - Fork 175
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
Fix duration calculation #296
Conversation
3904b3e
to
3f93379
Compare
Maybe a test can be added here: relative-time-element/test/duration.ts Line 231 in e914da2
|
If the project members have interests in this PR, I could add later. |
Thanks so much for diving into this @wxiaoguang! Looks like this proposed solution is causing one test to fail so we're unable to merge it at this time. You should be able to run the tests locally using |
But that failure seems not related. I have noticed that even on main branch, it still fails (that's another reason why I didn't touch the test code, I just would like to see whether it fails in your CI tasks).
|
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed CI failure is present in prod, in that case I think we can move forward with this. @wxiaoguang Just have a logic question and adding tests I think is a great idea :)
A test is added in fc858c3 and added comments to clarify the problem. |
And made one more commit: if we'd like to support "11 months": 60bc336 corrected the behavior and fixed the tests. Feel free to choose the behavior you like. |
"Fixed" the "10y vs 11y" problem in da833cf, now the CI should be able to pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM
Merged! Thanks so much for doing this @wxiaoguang |
Fix #32716 Tested, it still works. - cc @wxiaoguang for github/relative-time-element#296 Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Fix duration calculation
The simplest fix for #250 (comment) , not ideal, just a quick fix.