-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GIX-1872 Make secondsToDuration consistent with daysToDuration (#3310)
# Motivation We use both `secondsToDuration` and `daysToDuration` to render the same time period so they should be consistent but currently they are not. This PR fixes https://dfinity.atlassian.net/browse/GIX-1872. It does not aim to fix https://dfinity.atlassian.net/browse/GIX-1770 which is still being discussed. I think it's worthwhile to fix GIX-1872 and put a test in place that the rendering is consistent before we have a decision on GIX-1770. # Changes 1. Reimplement `secondsToDuration`. 2. Update tests for `secondsToDuration` for the new implementation. 3. Test that both functions return the same string for periods that are a whole number of days between 1 and 3000. # Tests Extensive unit test are updated. # Todos - [x] Add entry to changelog (if necessary).
- Loading branch information
Showing
4 changed files
with
64 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters