Add (optional) output format for decimal hours #334
jotaen
started this conversation in
Feature ideas & discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the default and canonical output format is the
3h
,15m
, or5h30m
notation (as defined by the spec).The CLI provides a
--decimal
option, which renders the decimal minutes of all values without suffix/unit, e.g.180
,15
, or330
.There could be another output format for rendering hour values as decimal-based floating point values, e.g.
3
,0.25
,5.5
.3h
180
3
15m
15
0.25
5h30m
330
5.5
One caveat about such an “hour”-based floating point format would be that it’s subject to rounding. E.g.,
3h34m
would yield3.56666666…
. For pragmatic reasons, the precision could be hard-coded, e.g. at two digits.Flag
The current
--decimal
flag should probably consolidated with that new output format. Potential solutions:--decimal
flag take a value, i.e. eithermin
orhour
.--format decimal-minutes
or--format decimal-hours
(or similar), which would implicitly default to the current canonical output format (e.g.,--format canonical
).Beta Was this translation helpful? Give feedback.
All reactions