Skip to content

fix: add days (d) unit to parse_duration#71

Open
gtx20060124-bot wants to merge 1 commit into
tine1117:mainfrom
gtx20060124-bot:fix-parse-duration-days
Open

fix: add days (d) unit to parse_duration#71
gtx20060124-bot wants to merge 1 commit into
tine1117:mainfrom
gtx20060124-bot:fix-parse-duration-days

Conversation

@gtx20060124-bot

Copy link
Copy Markdown

Fixes #1: parse_duration("1d") now returns 86400 instead of 0.

Changes:

  • Add "d": 86400 to _UNITS dict
  • Add d to the regex character class

All 7 existing tests pass.

Co-Authored-By: Gaotax2006 gaotax2006@users.noreply.github.com

- Add "d": 86400 to _UNITS dict
- Add d to the regex character class [wdhmsd]

Fixes tine1117#1: parse_duration("1d") now returns 86400 instead of 0
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