Skip to main content
Basics

AM/PM (Ante Meridiem / Post Meridiem)

am pm

Overview

AM (ante meridiem, Latin for "before noon") and PM (post meridiem, "after noon") are markers used in the 12-hour clock to divide the day into two halves. The hours 12:00 AM through 11:59 AM cover the morning, while 12:00 PM through 11:59 PM cover the afternoon and evening. The 12 o'clock hour is the one counter-intuitive part of the scheme, and the next section returns to it. This convention is the everyday standard in the United States, Canada, Australia, and the Philippines.

The 12:00 Ambiguity

The designations 12:00 AM and 12:00 PM are logically inconsistent. By convention 12:00 PM means noon and 12:00 AM means midnight, yet calling noon "post meridiem" (after noon) contradicts the literal meaning. Two workarounds are in common use. Style guides such as the NIST FAQ, the American Heritage Dictionary, and the Canadian Press Stylebook recommend dropping the marker altogether and writing "12 noon" and "12 midnight". Legal contracts in the United States, along with airline, bus, and railway timetables, instead shift the time by one minute and write "11:59 p.m." or "12:01 a.m." so that nothing is left to interpretation.

Handling in Software

When accepting user input in 12-hour format, special care is needed around the 12 o'clock hour. 12:30 AM converts to 0:30 in 24-hour time, while 12:30 PM stays 12:30. Input validation must reject illegal values such as 12:60 PM or 13:00 PM. The safest design pattern is to store all times internally in 24-hour format (0 through 23) and convert to AM/PM only at the display layer.

Was this article helpful?

Related Terms

Related Articles