This is for all those americans who freak out when I tell them the time in 24 hour format (what they insist in calling “military time” — tsk, americans… they see war everywhere! 😉 ).
The rule is pretty simple, really: “If the hours are greater than 12, then subtract 12 from them and make it pm”. Think of an analog clock and you’ll get it.
For the geeks out there, this is Python code…
if hours > 12:
hours = hours – 12
status = “pm”
Annunci
Rispondi