Skip to content

fix: add support for 'd' (days) unit in parse_duration#42

Open
Ishant5436 wants to merge 1 commit into
tine1117:mainfrom
Ishant5436:fix-parse-duration
Open

fix: add support for 'd' (days) unit in parse_duration#42
Ishant5436 wants to merge 1 commit into
tine1117:mainfrom
Ishant5436:fix-parse-duration

Conversation

@Ishant5436
Copy link
Copy Markdown

/claim #1

Fixes the missing d (days) unit in parse_duration by adding "d": 86400 to the _UNITS dictionary.

Also added regression tests for 1d and 2d4h in tests/test_duration_utils.py to ensure it works accurately and handles combined units correctly.

All 9 tests passed locally:

python3 -m unittest discover -s tests
.........
----------------------------------------------------------------------
Ran 9 tests in 0.000s

OK

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.

1 participant