Challenge
Your task is to output the time (in 12 hour time) in ascii art.
All characters that will be used are as follows:
___ __ ___ ____ _ _ _____ __ ______
/ _ \ /_ | |__ \ |___ \ | || | | ____| / / |____ |
| | | | | | ) | __) | | || |_ | |__ / /_ / /
| | | | | | / / |__ < |__ _| |___ \ | '_ \ / /
| |_| | | | / /_ ___) | | | ___) | | (_) | / /
\___/ |_| |____| |____/ |_| |____/ \___/ /_/
___ ___
/ _ \ / _ \ _
| (_) | | (_) | __ _ _ __ _ __ _ __ (_)
> _ < \__, | / _` | ' \ | '_ \ ' \ _
| (_) | / / \__,_|_|_|_| | .__/_|_|_| (_)
\___/ /_/ |_|
(For each number/symbol individually, consult this gist).
You will receive input in an array of the form:
[hours, minutes, 'am/pm']
. For example,[4, 57, 'am']
, with single quotes only used for am/pm- or
"hours-minutes-am/pm"
. For example,"4-56-am"
- or
[hours, 'minutes', 'am/pm']
for languages that cannot handle leading zeroes on numbers. For example,[4, '07', 'am']
You may use either input method.
Output will be in the form 1 2 : 5 9 am
, where there is one initial space, two spaces between each number (in the gist, each number already has one space on each side), one space between : (colon) and the neighbouring numbers, and one space between the last number and am/pm
, with an optional leading and/or trailing newline. All spaces are between the right-most point of the symbol on the left and the left-most point of the symbol on the right.
Implicit output is allowed.
Lowest byte size wins.
The am/pm
are to be aligned such that the bottom of the p
in pm
is aligned with the bottom of the rest of the output, that is, the undercore denoting the top of am/pm
starts on the third line down (not counting a leading newline).
The colon is to be aligned such that it's first character (an underscore) starts on the second line down (not counting a leading newline).
For minutes < 10
, output the minutes with a leading 0
(you should receive this in the input). For example, [8, 04, 'pm']
-> 8 : 0 4 pm
.
You must not fetch the data for the numbers from a library or external resource. All data must be contained within the program.
For example, for the input [12, 47, 'am']
, the output would be as follows:
__ ___ _ _ ______
/_ | |__ \ _ | || | |____ |
| | ) | (_) | || |_ / / __ _ _ __
| | / / _ |__ _| / / / _` | ' \
| | / /_ (_) | | / / \__,_|_|_|_|
|_| |____| |_| /_/
(If you see any edge cases that you can't decide what to do with, please post in comments and I will add them to examples).