Open chris114782 opened 1 year ago
I think this is a good feature, but I think it could be supported with a more general syntax.
This PR started to implement a new set of syntax: https://github.com/jazzband/Watson/pull/484
I would extend this PR to also support this:
watson log -f -14d
watson log -f -2w
watson log -f -14d -t -1d
And it would support more complex duration like this:
1w2d (9 days)
1d6h (1 day 6 hours)
I implemented a config option for this in https://github.com/jazzband/Watson/pull/436 a while back. I don't use watson currently, but I ran that for a few years and it worked well
When viewing the log, I don't have much use for viewing calendar periods like the current day, week or month, as we typically work in 2 week periods and this usually spans multiple calendar periods.
For example, if I want to see my time over the past 2 weeks on today, 10th May 2023, I have to use
watson log --year
as --month doesn't show the full period, but that then shows me months of logged work.It would be great if watson log --day and watson log --week could take a number to show the range, otherwise I have to work out what the date is for the --from argument.
So for example
watson log --day 14
would show the last 14 days worth of logs.watson log --week 2
would show the same