Skip to content

fix: handle days unit in parse_duration#23

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

fix: handle days unit in parse_duration#23
duongynhi000005-oss wants to merge 1 commit into
tine1117:mainfrom
duongynhi000005-oss:fix/parse-duration-days

Conversation

@duongynhi000005-oss
Copy link
Copy Markdown

Fixes #1

The parse_duration function silently dropped the d (days) unit because _UNITS was missing the key d: 86400.

Changes:

  • Added "d": 86400 to _UNITS dict in duration_utils.py
  • Added test_days and test_days_combined tests

All 9 tests pass.

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