Skip to content

fix: add missing days (d) unit to parse_duration#62

Open
lucahermes444-arch wants to merge 1 commit into
tine1117:mainfrom
lucahermes444-arch:fix/parse-duration-days
Open

fix: add missing days (d) unit to parse_duration#62
lucahermes444-arch wants to merge 1 commit into
tine1117:mainfrom
lucahermes444-arch:fix/parse-duration-days

Conversation

@lucahermes444-arch

Copy link
Copy Markdown

Fix

Adds the d (days) unit to parse_duration(). The regex already matched d, but the value was silently ignored.

Changes

  • duration_utils.py: Added "d": 86400 to _UNITS
  • tests/test_duration_utils.py: Added test_days and test_days_combined (9 tests, all pass)

Verification

All 9 tests pass.

Closes #1

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.

parse_duration drops the days (d) unit

1 participant