Skip to content

Clean up internal logic for time conversions, and add support for HH:MM format#234

Merged
LswaN58 merged 9 commits intomainfrom
issue/232-clean-internal-logic-for-time-conversions
Oct 13, 2025
Merged

Clean up internal logic for time conversions, and add support for HH:MM format#234
LswaN58 merged 9 commits intomainfrom
issue/232-clean-internal-logic-for-time-conversions

Conversation

@LswaN58
Copy link
Member

@LswaN58 LswaN58 commented Oct 13, 2025

In general, we should now be able to support the following forms of timedeltas. A +/- indicates we test for both positive and negative timedeltas with given format:

  • HH:MM:SS.mmmmmm (+/-)
  • D day, HH:MM:SS.mmmmmm (+/-)
  • D days, HH:MM:SS.mmmmmm (+/-)
  • HH:MM (+/-)

Note : Based on the formats above, a string with a single colon (:) will be interpreted as clock time, i.e. hours and minutes.
For Example : 1:23 will be interpreted as one (1) hour, twenty-three (23) minutes.

Similar formats are supported for timezones (by virtue of parsing a timedelta as the offset from UTC), optionally including a UTC[+/-] as prefix.

Resolves #232
Resolves #233

@LswaN58 LswaN58 added this to the ogd-common 2.0 'refactor' milestone Oct 13, 2025
@LswaN58 LswaN58 self-assigned this Oct 13, 2025
@LswaN58 LswaN58 linked an issue Oct 13, 2025 that may be closed by this pull request
Copy link
Member Author

@LswaN58 LswaN58 left a comment

Choose a reason for hiding this comment

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

Seems legit

@LswaN58 LswaN58 merged commit 27de505 into main Oct 13, 2025
19 of 20 checks passed
@LswaN58 LswaN58 deleted the issue/232-clean-internal-logic-for-time-conversions branch October 13, 2025 23:31
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.

Support converting from timedelta strings that lack seconds-place part Nicer, cleaner internal logic for time-related conversions

1 participant