2nd March 2003, 2:51 AM
There's not even much of anything to memorize.
Just remember TWO lines.
If hour is greater than 12, subtract 12 and suffix with PM.
If not converting to 12 hour format then
if hour is equal to 24 change hour to 00 'this is midnight
What is so hard about that? When converting the other way, just one line.
If hour is PM, add 12.
Seriously, there is nothing to military time!
Just remember TWO lines.
If hour is greater than 12, subtract 12 and suffix with PM.
If not converting to 12 hour format then
if hour is equal to 24 change hour to 00 'this is midnight
What is so hard about that? When converting the other way, just one line.
If hour is PM, add 12.
Seriously, there is nothing to military time!
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." ~ Charles Babbage (1791-1871)