relative-time-element icon indicating copy to clipboard operation
relative-time-element copied to clipboard

Reimplement duration rounding

Open leduyquang753 opened this issue 1 year ago • 4 comments

(This is part of a set of multiple pull requests looking to overhaul the calculation functions.)

This pull request reimplements the roundToSingleUnit function with more robust logic. The original date is now computed through the applyDuration function (a new implementation is in #298).

As this is an isolated pull request, tests will appear to fail until changes from the other pull requests of the set are integrated.

leduyquang753 avatar Dec 31 '24 10:12 leduyquang753

I have moved the implementation of relativeTime to apply to roundToSingleUnit as per @keithamus's suggestion in #300.

leduyquang753 avatar Jan 13 '25 10:01 leduyquang753

As this is an isolated pull request, tests will appear to fail until changes from the other pull requests of the set are integrated.

This is expected and I have mentioned in my new pull request description: "As this is an isolated pull request, tests will appear to fail until changes from the other pull requests of the set are integrated."

Particularly, the tests are based on the usage of the new implementations of applyDuration and elapsedTime from the other pull requests.

leduyquang753 avatar Jan 13 '25 11:01 leduyquang753

This is expected and I have mentioned in my new pull request description

That's fine, more meant as a note for colleagues. I'd like us to merge in an order which maintains the health of the main branch, if we can (despite the current failing test in main).

the other pull requests

Which other PRs do you anticipate will reduce the test failures on this one?

keithamus avatar Jan 13 '25 11:01 keithamus

Which other PRs do you anticipate will reduce the test failures on this one?

My new implementation of applyDuration in #298 and of elapsedTime in #299.

leduyquang753 avatar Jan 13 '25 11:01 leduyquang753