Syntax

[edit]

Parameters

[edit]

Examples:


Hour format

[edit]

The hour format parameter (({hour_format))} can be variously 'g', 'G', 'h', or 'H', specifying whether to use 12 hour time with AM/PM (g/h) or 24 hour time (G/H), and whether to truncate (g/G) numbers under 10 or not (h/H).

Examples:




See also

[edit]

Multiple units of time

[edit]
Type Adjustable Current Last Next
Date and time ((time)) ((Currentdate)) (MDY)
((Plain now)) (DMY)
((Now)) (DMY in a complete sentence)
((Simple now))
Date only ((Dateonly))
((Datedow))
(Has the day of the week)
((Date)) (Chose format)
((DATE)) (prefixed by date=)
((TODAY)) (DMY)
((Yesterday))
((Day-1))
((Tomorrow))
((Day+1))
Month and year only ((Monthyear)) ((Monthyear-1)) ((Monthyear+1))
Time only ((Timeonly)) ((CURRENTTIME)) (12 h format)
((CURRENTTIME24)) (24 h format)
Banners ((Right now))
(Blue with time and number of Wikipedia articles)
Timestamp ((Timestamp))
(Format YYYYMMDDhhmmss)

Single units of time

[edit]
Unit of time Adjustable Current Last Next
SECOND ((CURRENTSECOND))
MINUTE ((CURRENTMINUTE))
HOUR ((CURRENTHOUR))
WEEK ((CURRENTWEEK))
((CURRENTWEEKOFMONTH))
Day of Week ((DAYOFWEEK)) ((CURRENTDAYNAME))
((CURRENTWEEKDAYABBREV))
((CURRENTWEEKDAY))
MONTH ((MONTHNAME))
((MONTHABBREV))
((MONTHNUMBER))
((MONTH)) (zero padded)
((CURRENTMONTHNAME))
((CURRENTMONTHABBREV))
((CURRENTMONTH1))
((CURRENTMONTHDAYS))
((LASTMONTHNAME)) ((NEXTMONTHNAME))
Day of Month ((CURRENTDAY))
((CURRENTDAY2)) (zero padded)
YEAR ((CURRENTYEARCC))
((CURRENTYEARYY))
((CURRENTISOYEAR))
((CURRENTYEAR))
((LASTYEAR)) ((NEXTYEAR))
Day of Year ((CURRENTDAYOFYEAR))
DECADE ((DECADE)) ((CURRENTDECADE))
CENTURY ((CENTURY)) ((CURRENTCENTURY))
MILLENNIUM ((MILLENNIUM))

Date and time templates made for substitution:

[edit]

Month:
((Lmonth)) produces Jul
((Nmonth)) produces Sep
((LastMonth)) produces July 2024
((NextMonth)) produces September 2024


Individual templates

[edit]

Categories of templates

[edit]

Template Data

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Format time in articles based on its TemplateData.

TemplateData for Format time


Formats a time of day

Template parameters

ParameterDescriptionTypeStatus
Hourhour hh 1

Hour of the day, in 24 hour format

Example
13
Auto value
Numberrequired
Minuteminute mm 2

minutes after the hour

Example
3
Auto value
0
Numbersuggested
Secondsecond ss sec 3

Seconds after the minute

Numberoptional
Hour formathour_format

Formats hours and whether to render AM/PM or a.m./p.m.

Example
g (7:00 p.m.), G (07:00 PM), h (19:00), or H (19:00)
Stringsuggested
timezonetimezone tz TimeZone 4

A numerical offset from UTC, or 'Z'. If non-empty, shows time zone

Example
Z
Stringoptional