grdc(6): Add '-t' option to show time in 12-hour format
authorAaron LI <aly@aaronly.me>
Sun, 21 Feb 2021 08:12:49 +0000 (16:12 +0800)
committerAaron LI <aly@aaronly.me>
Sun, 21 Feb 2021 08:12:49 +0000 (16:12 +0800)
commitffe1d30b7611d4b27d06edc40cc191b74be21252
tree62afbc7cde83b74f143a92977d124625977b4d8a
parent6159ff08e48698c1e9482f2b02adc457b88d4d71
grdc(6): Add '-t' option to show time in 12-hour format

Partially based on FreeBSD's implementation (revision 112749).  But I
moved the AM/PM mark to the upper-left corner instead of the
bottom-right corner as in FreeBSD, because the mark in the bottom-right
corner would be flushed by scrolling.

In addition, improve the determination of AM/PM mark, including:
00:mm -> 12:mm AM
12:mm -> 12:mm PM
games/grdc/grdc.6
games/grdc/grdc.c