Usage

[edit]

This template (((Format date))) returns a date, or date-time, without the hidden version for use in microformats. This template is probably best used internally in other templates.

If you need the microformat support, use template ((Start date)) instead.

If you want sortable dates for a table, use ((Date table sorting)) instead.

Syntax

[edit]

Examples:

An optional parameter, df, can be set to "y" or "yes" (or indeed any value) to display the day before the month. This is primarily used in articles about events in parts of the world where the day precedes the month in a date.

Examples:

Note: The template will appear broken when the parameters are left blank (as seen hereinbefore).

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]

No description.

Template parameters

ParameterDescriptionTypeStatus
Year1 year

The year to render in the date

Example
1997
Auto value
Numbersuggested
Month2 month

The month to render in the date

Example
January
Auto value
Stringsuggested
Day3 day

The day of the month to format in the date

Example
20
Auto value
Stringsuggested
Hour (HH)4 hour hh

the hour to format in the date (if desired)

Example
03
Auto value
Stringoptional
Minute (MM)5 minute mm

The minute to format in the date (if desired)

Example
21
Stringoptional
Second (SS)6 second ss sec

The second to format in the date (if desired)

Example
10
Auto value
Stringoptional
Time zone7 timezone TimeZone tz

A numerical offset from UTC, or 'Z'

Example
+5
Stringoptional
Day first?df dayfirst

If 'y' or 'yes', displays the day before the month

Stringoptional
Time joinertime_joiner

if included, replaces comma in "<time>, <date>" with the value given

Example
on
Stringoptional
Hour formathour_format

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

Example
g (7 ... p.m.), G (07 ... PM), h (19), or H (19)
Stringoptional