Skip to content

fix: count days (d) in parse_duration - #131

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

wujiangwork wants to merge 1 commit into
tine1117:mainfrom
wujiangwork:fix/parse-duration-days

Conversation

@wujiangwork

Copy link
Copy Markdown

Summary

  • README documents d (days) as a supported unit, but _UNITS omitted it, so tokens like 1d were consumed by the regex and then ignored (1d0).
  • Add d: 86400 and regression tests for 1d / 1d12h.

Fixes #1

Test plan

  • python3 -m unittest discover -s tests (9/9 OK)

/claim #1

README lists d as supported, but _UNITS omitted it so tokens like 1d
were consumed and ignored (1d -> 0). Add d=86400 and regression tests.
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

2 participants