dominikbraun / timetrace

A simple CLI for tracking your working time.
Apache License 2.0
668 stars 75 forks source link

Feature Request: Decimal time #179

Closed mattkasun closed 2 years ago

mattkasun commented 2 years ago

rather than hour minutes display status/reports in decimal hours e.g. 1.2h vice 1h 13min.

default (useDecimalHours = 0)
+-------------------+----------------------+----------------+----------+
|  CURRENT PROJECT  |  WORKED SINCE START  |  WORKED TODAY  |  BREAKS  |
+-------------------+----------------------+----------------+----------+
| make-coffee       | 1h 8min              | 3h 8min        | 0h 11min |
+-------------------+----------------------+----------------+----------+

Decimal Hours (useDecimalHours = 1)
+-------------------+----------------------+----------------+----------+
|  CURRENT PROJECT  |  WORKED SINCE START  |  WORKED TODAY  |  BREAKS  |
+-------------------+----------------------+----------------+----------+
| make-coffee       | 1.2h                 | 3.2h           | 0.2h     |
+-------------------+----------------------+----------------+----------+

Both (useDecimalHours = 2)
+-------------------+----------------------+----------------+---------------+
|  CURRENT PROJECT  |  WORKED SINCE START  |  WORKED TODAY  |    BREAKS     |
+-------------------+----------------------+----------------+---------------+
| make-coffee       | 1h 8min 1.2h         | 3h 8min 3.2h   | 0h 11min 0.2h |
+-------------------+----------------------+----------------+---------------+
mattkasun commented 2 years ago

Incorporated by PR #180