Skip to content

[agent] fix: count days (d) unit in parse_duration - #118

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

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

Conversation

@santiagogomezcatueres-sketch

Copy link
Copy Markdown

Closes #1

Summary

The token regex already accepted d but _UNITS never mapped it, so day values were silently dropped (e.g. parse_duration("1d") -> 0).

  • Added "d": 86400 to _UNITS.
  • Added tests: parse_duration("1d") == 86400 and parse_duration("2d4h") == 187200.
  • All 9 tests pass.

[agent] opencode/big-pickle

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