Skip to content

Format AM and PM in times correctly (EK00044)

Consistent 12-hour time formatting keeps documentation easy to scan. Write times as a numeral, a space, then capital AM or PM without periods.

Writing 12-hour times as a numeral, a space, then capital AM or PM without periods keeps schedules predictable and easy to scan. EkLine flags times where AM or PM is lowercase, includes periods, is missing the leading space, or attaches to the number (rule EK00044).

Why does consistent time formatting matter in documentation?

Section titled “Why does consistent time formatting matter in documentation?”

Inconsistent time formats like 2pm, 2 p.m., and 2PM across a document look careless and slow a reader who scans for a schedule. A single format — 2 PM — is predictable and reads cleanly. Consistent times also copy-paste into calendars without cleanup.

EK00044 flags a 12-hour time where AM or PM is lowercase, has periods, lacks the leading space, or attaches to the number.

  • Incorrect: The build runs at 2pm.
  • Correct: The build runs at 2 PM.
  • Incorrect: The build runs at 2 p.m.
  • Correct: The build runs at 2 PM.
  • Incorrect: The build runs at 2PM.
  • Correct: The build runs at 2 PM.

Write the time as a numeral, a space, then capital AM or PM without periods — for example, 2 PM.

Write a numeral, a space, then capital AM or PM without periods — for example, 2 PM. Avoid forms like 2pm, 2 p.m., or 2PM.

Yes. Use capital AM or PM without periods, and keep a space between the number and the abbreviation.

PropertyValue
Rule IDEK00044
CategorySentences and phrases
Default severityError
Enabled by defaultYes

To keep a flagged time on one line, add an inline comment with a reason:

<!-- ekline-ignore-next-line EK00044 -- matches the vendor's log format -->
The job logged an error at 2pm.

To disable the rule across your project, add it to the ignore list in your configuration file.

  • EK00055 — Use numerals for time measurements
  • EK00051 — Use American-style number formatting