feat: add --minutes flag to timesheet command (#79) #82
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "79_timesheet-use-minutes-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
-m/--minutesflag tostreamd timesheetcommandHH:MM(e.g.,8:30) instead of decimal hours (e.g.,8.5h)-1:30)Changes
src/cli/args.rs: ConvertedTimesheetfrom unit variant to struct variant with--minutes/-mbool flagsrc/main.rs: Destructures the new flag and passes it totimesheet::run()src/cli/commands/timesheet.rs: Updatedformat_hours()andformat_diff()to acceptuse_minutes: bool; propagated flag through all print helpers; added 8 unit testsTest plan
cargo test— all 164 tests passcargo clippy— no warningsstreamd timesheet— unchanged decimal outputstreamd timesheet --minutes/streamd timesheet -m— HH:MM outputCloses #79
b9954d2157to9563ff4d93