Watson icon indicating copy to clipboard operation
Watson copied to clipboard

Ability for `report --week` to output data for previous week.

Open neumond opened this issue 6 years ago • 4 comments

Would be very useful. Or even output aggregation by last N weeks.

neumond avatar Feb 11 '19 11:02 neumond

Hi @neumond! Thanks for the report. You are right: there is plenty of scenario that could be useful to implement in the report command. We need to think a bit more this command to make it more versatile.

jmaupetit avatar Feb 12 '19 07:02 jmaupetit

I've been looking for this feature. I think an option for previous week would cover most scenarios without adding lots of complexity.

However, if you really want something more versatile, how about this:

Make the current option --week take an optional argument to select a specific week. Something like --week=21 to get the report for week nr. 21 without needing to specify --from & --to. If no argument is given, use the current week (current behaviour). Add a shorthand (e.g. prev) to refer to the previous week: --week=prev.

While I only mentioned week, this should be work for year / month / lunar / day as well.

W4RH4WK avatar Jul 24 '20 18:07 W4RH4WK

Further to W4RH4WK's comment, could you use negative numbers for previous weeks? So last week is --week=-1?

minchinweb avatar Jul 25 '20 04:07 minchinweb

I like that even better than the prev magic keyword!

W4RH4WK avatar Jul 25 '20 08:07 W4RH4WK