Skip to content

Format long durations as HH:MM:SS and DD:HH:MM:SS - #4

Open
moz-kathyreid wants to merge 1 commit into
mainfrom
feat/time-format-hours-days
Open

Format long durations as HH:MM:SS and DD:HH:MM:SS#4
moz-kathyreid wants to merge 1 commit into
mainfrom
feat/time-format-hours-days

Conversation

@moz-kathyreid

Copy link
Copy Markdown

Summary

  • _format_time now formats durations ≥ 60 min as HH:MM:SS and ≥ 24 hours as DD:HH:MM:SS; durations under 60 min keep the existing MM:SS format
  • Both ETA and total-time displays benefit automatically since they share the same helper
  • 10 parametrised test cases added covering all three formats, boundary values, and the negative/sentinel case

Test plan

  • uv run --with pytest pytest tests/ -v — all 12 tests pass
  • Manual: run a long-duration simulation and confirm ETA switches format at the 60-min and 24-hour thresholds

🤖 Generated with Claude Code

_format_time now switches format based on magnitude:
- < 60 min → MM:SS (existing behaviour)
- ≥ 60 min → HH:MM:SS
- ≥ 24 hours → DD:HH:MM:SS

Parametrised tests cover all three formats and the negative/sentinel case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants