Massively rework the time tracker, mainly to support times across midnight

This commit is contained in:
Campbell Alden 2024-11-07 15:48:37 +09:00
parent b6df8af541
commit a11d5c0f5d
6 changed files with 170 additions and 236 deletions

14
src/args.rs Normal file
View file

@ -0,0 +1,14 @@
use clap::Parser;
/// A simple program to track time spans and calculate remaining hours to work
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
pub struct Args {
/// How many hours you intend to work (sums with `minutes`)
#[arg(long, default_value_t = 8)]
pub hours: i64,
/// How many minutes you intend to work (sums with `hours`)
#[arg(long, default_value_t = 0)]
pub minutes: i64,
}