Ante meridiem means "before midday," and post meridiem means "after midday." In Latin, ante means "before" and post means "after." Meridiem comes from the Latin word meridies, which means "noon" or "midday."
The 12-hour clock has been traced back to 1500 B.C. in the ancient Egyptian and Mesopotamian civilizations. At that time, sundials were used to determine the sun's highest point in the sky, also known as midday.
During the 15th and 16th century the 12-hour clock became more widely used across Northern Europe because of its simple design using only 12 numbers on the face versus 24.
A.m. and p.m. are used in countries where the 12-hour clock is the dominant written and spoken time-keeping system. Those countries are Australia, Bangladesh, Canada, Colombia, Egypt, El Salvador, Great Britain, Honduras, India, Malaysia, Mexico, New Zealand, Nicaragua, Pakistan, Philippines, Saudi Arabia and the United States.
In Associated Press and and Modern Language Association style, the abbreviations are written in lower-case letters with periods. Example: a.m. Style variations of the abbreviation are lower-case letters without periods and capitalized letter with or without periods. Examples: am, A.M. and AM.
Midnight is commonly referred to as 12 a.m. while noon is considered 12 p.m. The a.m. and p.m. designation for midnight and noon, however, are technically incorrect. For example, at midnight it is both 12 hours before and 12 hours after noon, and at noon it is neither 12 hours before nor 12 hours after noon.
Therefore, using the words midnight and noon are preferred over 12 a.m. and 12 p.m.