Skip to content

fix: add missing days (d) unit to parse_duration#46

Open
SyntaxHQDEV wants to merge 1 commit into
tine1117:mainfrom
SyntaxHQDEV:fix/days-unit-issue1
Open

fix: add missing days (d) unit to parse_duration#46
SyntaxHQDEV wants to merge 1 commit into
tine1117:mainfrom
SyntaxHQDEV:fix/days-unit-issue1

Conversation

@SyntaxHQDEV

Copy link
Copy Markdown

Closes #1

Summary

Add the missing d (days) unit to parse_duration. Maps d to 86400 seconds.

Acceptance criteria

  • parse_duration("1d") returns 86400
  • parse_duration("2d4h") returns 187200
  • All existing tests still pass
  • Added tests covering the days unit

The parse_duration function accepts the 'd' character in its token regex
but never adds the corresponding value to the total. This fix maps 'd'
to 86400 seconds and adds test coverage.

Closes tine1117#1

Co-authored-by: openhands <openhands@all-hands.dev>
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