12 AM/PM to Midnight/Noon Correction

Description

This rule enforces the use of 'midnight' or 'noon' instead of '12 a.m.' or '12 p.m.' respectively. This is a common style guide requirement because '12 a.m.' and '12 p.m.' can be confusing and ambiguous. The terms 'midnight' and 'noon' are clearer and leave no room for misinterpretation. The rule helps maintain clarity in time references and follows best practices in technical and professional writing.

Examples

Will flag:

  • "The meeting starts at 12 p.m."
  • "The server maintenance begins at 12 a.m."
  • "Doors close at 12PM"
  • "Submit your work before 12 p.m."

Should use instead:

  • "The meeting starts at noon"
  • "The server maintenance begins at midnight"
  • "Doors close at noon"
  • "Submit your work before noon"

The rule will catch variations in formatting, including:

  • 12pm
  • 12 PM
  • 12p.m.
  • 12 a.m.
  • 12AM
  • 12 A.M.

Rule Source

This rule comes from: https://github.com/mesosphere/dcos-docs-site

Rule Definition

extends: existence
message: "Use 'midnight' or 'noon'."
ignorecase: true
level: error
nonword: true
tokens:
  - '12 ?[ap]\.?m\.?'