feat: add --minutes flag to timesheet command (#79) #82

Merged
kfickel merged 3 commits from 79_timesheet-use-minutes-flag into main 2026-04-07 08:13:21 +02:00
Owner

Summary

  • Adds -m/--minutes flag to streamd timesheet command
  • When set, time is displayed as HH:MM (e.g., 8:30) instead of decimal hours (e.g., 8.5h)
  • Applies everywhere: per-day columns, monthly totals, cumulative balance, and outside-period warnings
  • Negative diffs display with a leading minus sign (e.g., -1:30)

Changes

  • src/cli/args.rs: Converted Timesheet from unit variant to struct variant with --minutes / -m bool flag
  • src/main.rs: Destructures the new flag and passes it to timesheet::run()
  • src/cli/commands/timesheet.rs: Updated format_hours() and format_diff() to accept use_minutes: bool; propagated flag through all print helpers; added 8 unit tests

Test plan

  • cargo test — all 164 tests pass
  • cargo clippy — no warnings
  • streamd timesheet — unchanged decimal output
  • streamd timesheet --minutes / streamd timesheet -m — HH:MM output

Closes #79

## Summary - Adds `-m`/`--minutes` flag to `streamd timesheet` command - When set, time is displayed as `HH:MM` (e.g., `8:30`) instead of decimal hours (e.g., `8.5h`) - Applies everywhere: per-day columns, monthly totals, cumulative balance, and outside-period warnings - Negative diffs display with a leading minus sign (e.g., `-1:30`) ## Changes - `src/cli/args.rs`: Converted `Timesheet` from unit variant to struct variant with `--minutes` / `-m` bool flag - `src/main.rs`: Destructures the new flag and passes it to `timesheet::run()` - `src/cli/commands/timesheet.rs`: Updated `format_hours()` and `format_diff()` to accept `use_minutes: bool`; propagated flag through all print helpers; added 8 unit tests ## Test plan - [ ] `cargo test` — all 164 tests pass - [ ] `cargo clippy` — no warnings - [ ] `streamd timesheet` — unchanged decimal output - [ ] `streamd timesheet --minutes` / `streamd timesheet -m` — HH:MM output Closes #79
kfickel added 1 commit 2026-04-07 07:58:00 +02:00
feat: add --minutes flag to timesheet command
All checks were successful
Release / Build and Release (push) Successful in 5s
Continuous Integration / Lint, Check & Test (push) Successful in 1m43s
Continuous Integration / Build Package (push) Successful in 1m56s
42d9ecd3d9
Adds a -m/--minutes flag to `streamd timesheet` that displays time
in HH:MM format (e.g., 8:30) instead of decimal hours (e.g., 8.5h).
Includes unit tests for both formatting functions.
kfickel added 1 commit 2026-04-07 07:59:57 +02:00
feat: bump to 0.2.0
Some checks failed
Continuous Integration / Build Package (push) Failing after 32s
Release / Build and Release (push) Failing after 52s
Continuous Integration / Lint, Check & Test (push) Failing after 54s
b9954d2157
kfickel force-pushed 79_timesheet-use-minutes-flag from b9954d2157 to 9563ff4d93 2026-04-07 08:07:07 +02:00 Compare
kfickel added 1 commit 2026-04-07 08:09:54 +02:00
ci: fix release-pipeline running on feature-branches
All checks were successful
Continuous Integration / Build Package (push) Successful in 26s
Continuous Integration / Lint, Check & Test (push) Successful in 56s
Release / Build and Release (push) Successful in 2m37s
a9acd34801
kfickel merged commit a9acd34801 into main 2026-04-07 08:13:21 +02:00
kfickel deleted branch 79_timesheet-use-minutes-flag 2026-04-07 08:13:21 +02:00
Sign in to join this conversation.
No reviewers
No labels
planned
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: kfickel/streamd#82
No description provided.