Skip to content

[baobao] fix: add missing days (d) unit to parse_duration#30

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

[baobao] fix: add missing days (d) unit to parse_duration#30
mkcash wants to merge 1 commit into
tine1117:mainfrom
mkcash:fix/parse-duration-days

Conversation

@mkcash
Copy link
Copy Markdown

@mkcash mkcash commented Jun 5, 2026

/bounty $50

Fixes #1

The parse_duration() function's _UNITS dict was missing the "d" (days) entry. While the token regex [wdhms] and the README both listed d as a supported unit, the conversion constant was absent, so parse_duration('1d') silently returned 0 instead of 86400.

Change: Added d: 86400 to _UNITS. All existing 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