This rule enforces consistent formatting of time expressions using AM and PM indicators. It ensures that time expressions follow a standard format where "AM" and "PM" are capitalized and preceded by a space, which improves readability and maintains professional consistency in documentation.
What It Checks For
The rule flags time expressions that:
- Have AM/PM directly attached to numbers without a space (e.g., "2PM")
- Use lowercase "am" or "pm"
- Use periods in A.M. or P.M.
Examples
Will flag these incorrect formats:
2PM ❌
3:15pm ❌
10A.M. ❌
Should be written as:
2 PM ✅
3:15 PM ✅
10 AM ✅
The rule helps maintain consistency with the Google Developer Documentation Style Guide and ensures time expressions are clear and professional across all documentation.