E52D Fix an error in string representation of RelativeDuration. by vpetrovykh · Pull Request #453 · geldata/gel-python · GitHub
[go: up one dir, main page]

Skip to content

Fix an error in string representation of RelativeDuration.#453

Merged
vpetrovykh merged 1 commit intomasterfrom
duration
Jul 24, 2023
Merged

Fix an error in string representation of RelativeDuration.#453
vpetrovykh merged 1 commit intomasterfrom
duration

Conversation

@vpetrovykh
Copy link
Contributor

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.

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.
@vpetrovykh vpetrovykh requested a review from msullivan July 24, 2023 22:34
Copy link
Member
@msullivan msullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@vpetrovykh
Copy link
Contributor Author

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

Yeah, we probably want some nice getters or just @property for those at some point.

@vpetrovykh vpetrovykh merged commit a290b97 into master Jul 24, 2023
@vpetrovykh vpetrovykh deleted the duration branch July 24, 2023 23:36
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)
@aljazerzen aljazerzen mentioned this pull request Feb 23, 2024
This was referenced Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

336B
0