Template:Format time/doc
Jump to navigation
Jump to search
This is the documentation subpage of Template:Format time. It contains usage information that is not part of the underlying template.
{{format time|time}}
{{format time|time|format=|show-00-min=|2-digit-12hr=}}
Parameters
- time (unnamed parameter 1)
- Required. The time in 24-hour format. Hour values are 0-24 inclusive. Hour values without minutes are accepted (the minutes are assumed to be
:00). Leading zeroes for one-digit hours are optional. - Examples:
0,0:00,00,00:00,24, or24:00for 12:00 AM (midnight);1:15or01:15for 1:15 AM;15or15:00for 3:00 PM;19:30for 7:30 PM. - format
- Optional. Accepts values
24hrand12hr. Defaults to24hrif unspecified. 24hrformat will list the times as00to24, with a zero prefixed for hours 0-9.12hrformat will list the times as12 AM,1 AMto11 AM,12 PM,1 PMto11 PM.- 2-digit-12hr
- Optional. When set to any value, 12hr times will prefix a
0onto hours between 1 and 9, e.g.02 AMor05 PM. - When not set, 12hr times will not have a prefixed zero, e.g.
2 AMor5 PM. - This parameter has no effect on the display of 24hr times.
- show-00-min
- Optional. When set to any value, times that are exactly on the hour (i.e. end in
:00) will display with the minutes, e.g.11:00. - When not set, times that are exactly on the hour will display only the hour part without the minutes, e.g.
11. - This parameter has no effect on the display of times 1-59 minutes past the hour.