Regional preferences differ for 12-hour and 24-hour clocks
Aliases: clock-format preference · 12-hour versus 24-hour time · hour cycle
What it is
Locale hour-cycle preference determines whether time defaults to a twelve-hour cycle with a day-period marker or a twenty-four-hour cycle. Unicode further distinguishes cycles by origin and range, such as 0–11, 1–12, 0–23, and 1–24. Removing AM/PM alone therefore does not convert twelve-hour time correctly. Interfaces should start with the regional default and honor an explicit user choice.
Why it happens
Twelve-hour time requires AM/PM or finer morning, afternoon, and night periods to locate a time within the day; twenty-four-hour time encodes the cycle in the hour number. Locale data provides preferred and allowed hour cycles so a formatter can select the hour symbol, period marker, and local wording together. Hard-coding h:mm a or HH:mm ignores regional overrides, localized day periods, and conventions around midnight or noon.
Where it stops holding
A regional default does not replace individual preference. Military, clinical, transport, or global collaboration settings may prescribe twenty-four-hour time, and users may override the cycle through system settings or the -u-hc- locale extension. CLDR h24/k is a one-based display field and can render a time after midnight as 24:mm; ISO 8601 24:00 specifically denotes the end of a day, equal to the next day's 00:00, and does not thereby admit 24:30 as an ISO time. h24 formatter output must therefore not be reused as an ISO interchange value. An hour cycle also supplies no time zone: 18:00 can still refer to different instants without a location or offset.
Applying it
- Default to a locale-aware formatter's automatic hour cycle and read explicit system or account overrides; do not infer the cycle from a language name.
- Keep input and output conventions aligned. Twelve-hour input needs a clear, localized day-period control with an accessible name.
- Test midnight, noon, cycle boundaries, and single-digit hours, including sorting, spoken output, narrow layouts, and meaning after copying elsewhere.
- Display a zone or place separately for cross-zone events and let people view local time; twenty-four-hour notation is not a time-zone disambiguator.
Related
- Same group: S2.01.1 Year, month, and day order varies by region · S2.01.2 All-numeric dates are ambiguous · S2.01.4 The first day of the week varies by region · S2.01.5 Non-Gregorian calendars may need parallel display
- Adjacent: S2.06 Time zones and daylight saving time · S2.07 Relative times and time ranges
- Search terms:
Unicode hour cycle·locale timeData·day period formatting