- dhour - Convert times to decimal and back
- dhour [-h?vsSdDpPmeItV] <time(s)> ... ...
Dhour converts clock times into decimal parts of an hour or day,
and vice versa.
- Help, stdout.
- Help, stderr.
- Input time as hh:mm<:ss>.
This is the default input style; the default output format
is the same as that for the -D option.
- Output format becomes hh:mm:ss.
- Input time as hh.nnn; the default output
format is the same as that for the -S option.
- Output format becomes hh.nnn, or hours and percent of
hour. This is the default output format unless otherwise specified.
- Input time as 0.nnnn (% of day); the default output
format is the same as for the -S option. It is an error
if you supply “1.25” as a time (since that’s more than a day),
but you may leave out the 0.
- Output format becomes 0.nnnn, or percent of a day.
- Output format becomes mmmm:ss.
- Output format becomes ssss.
- Obtain dates/times from <file> instead of from the
- If dhour is reading from stdin or /dev/tty,
and you have specified this option, it will prompt (“dhour: ”)
- Print version date and die.
Tue Nov 26 16:47:44 MST 1996
$ dhour -v
$ dhour -v
16:48:35 = Tue Nov 26 16:48:35 1996 = 16.80972222
$ dhour -P
$ dhour -p 0.70069444
$ dhour -m
$ dhour -e
$ dhour -d 16.98
$ dhour -S
$ dhour -ep 0.70069444
BUGS & SPECIAL CONSIDERATIONS
- The ? in the -? must be escaped (preceded by a \)
to prevent interpretation as a metacharacter by some shells.
- Ivan Van Laningham. If you would like the C source, email me.
Main web site: http://www.pauahtun.org