nikolassv / bartib

A simple timetracker for the command line. It saves a log of all tracked activities as a plaintext file and allows you to create flexible reports.
GNU General Public License v3.0
670 stars 35 forks source link

Output the week report in hours instead of in days #12

Closed tcassaert closed 2 years ago

tcassaert commented 2 years ago

Currently, the week report looks like this:

project........ 1d 3h 12m
    Task_1    8h 35m
    Task_2   18h 37m

Total....... 1d 3h 12m

To me, a report in hours makes more sense, but maybe it can be just configurable instead of just changing it to hours, with something like --format={days,hours}.

nikolassv commented 2 years ago

Thank you for your suggestion! I agree with you that normally a report in hours would make more sense. I think I would make the output in hours the default and add an option for those who would like an output in days.

nikolassv commented 2 years ago

After considering several alternatives I have decided to just not show days in reports any more (Commit: c6c9ba17f8d8518dedd211c0c773d9b5bb10a2ba). For most use cases reports in days do not make sense and if someone really needs the number of days it can easily be calculated.

I have not added any extra option to show days. This would have created a lot of clutter in the code, but if someone comes up with an elegant solution for this I would happily accept a pull request.