Fix an error in string representation of RelativeDuration.#453
Merged
vpetrovykh merged 1 commit intomasterfrom Jul 24, 2023
Merged
Fix an error in string representation of RelativeDuration.#453vpetrovykh merged 1 commit intomasterfrom
vpetrovykh merged 1 commit intomasterfrom
Conversation
RelativeDuration was getting the '-' for the seconds component wrong in some cases. Specifically, when fractional seconds were 0, but larger units (hours or seconds) were non zero and negative. Also add test cases for similar situtation with other duration types.
msullivan
approved these changes
Jul 24, 2023
Member
There was a problem hiding this comment.
Well that is some fun.
It might be worth at some point exposing these hours/minutes/second components directly. Seems a shame to go through all of this trouble only to expose them via string formatting
Contributor
Author
Yeah, we probably want some nice getters or just |
msullivan
pushed a commit
that referenced
this pull request
Aug 9, 2023
RelativeDuration was getting the '-' for the seconds component wrong in some cases. Specifically, when fractional seconds were 0, but larger units (hours or seconds) were non zero and negative. Also add test cases for similar situtation with other duration types.
msullivan
added a commit
that referenced
this pull request
Aug 9, 2023
Changes ======= * Implement support for new type descriptor protocol (by @elprans in 47eec19 for #427) * Sync errors (by @elprans in 3bfb574 for #449) * Don't depend on exact syntax errors in tests (by @msullivan in b3ce0c6 for #451) * Fix an error in string representation of RelativeDuration. (by @vpetrovykh in 667da72 for #453) * Add multirange support. (by @vpetrovykh in 15e280e for #452)
msullivan
pushed a commit
that referenced
this pull request
Aug 9, 2023
RelativeDuration was getting the '-' for the seconds component wrong in some cases. Specifically, when fractional seconds were 0, but larger units (hours or seconds) were non zero and negative. Also add test cases for similar situtation with other duration types.
msullivan
added a commit
that referenced
this pull request
Aug 9, 2023
Changes ======= * Implement support for new type descriptor protocol (by @elprans in 47eec19 for #427) * Sync errors (by @elprans in 3bfb574 for #449) * Don't depend on exact syntax errors in tests (by @msullivan in b3ce0c6 for #451) * Fix an error in string representation of RelativeDuration. (by @vpetrovykh in 667da72 for #453) * Add multirange support. (by @vpetrovykh in 15e280e for #452)
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RelativeDuration was getting the '-' for the seconds component wrong in some cases. Specifically, when fractional seconds were 0, but larger units (hours or seconds) were non zero and negative.
Also add test cases for similar situtation with other duration types.