Difference between revisions of "Template:FULLDATE"

From blackwiki
Jump to navigation Jump to search
imported>Amalthea
m (Use {{template:documentation}} instead of transcluding directly)
imported>MSGJ
(add dmy per request, and tweak code)
Line 9: Line 9:
 
   |wiki      = H:i:s, [[j F]] [[Y]] "([[Coordinated Universal Time|UTC]])"
 
   |wiki      = H:i:s, [[j F]] [[Y]] "([[Coordinated Universal Time|UTC]])"
 
   |date      = Y-m-d
 
   |date      = Y-m-d
 +
  |dmy        = j F Y
 
   |medium
 
   |medium
−
   |F j, Y
+
   |#default  = F j, Y
 
   }}
 
   }}
−
|{{#if:{{{time|}}}|{{{time}}}|now}}}}<noinclude>
+
|{{#if:{{{time|}}}
 +
  |{{{time}}}
 +
  |now
 +
}}
 +
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
<!-- Add cats and interwikis to the /doc subpage, not here! -->
 
<!-- Add cats and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Revision as of 14:23, 11 October 2011

October 10, 2026

Template documentation[view] [edit] [history] [purge]

{{FULLDATE}} returns the full or short English date at current time (UTC time, as set on the Wikipedia server).

Usage

  • The type parameter is optional and can be any of:
    • dmy: display the current day of month, month name, and year
    • short: display the current month name and day of month
    • medium: display the current month name, day of month, and year (default)
    • long: display the current month name, day of month, year, and UTC time
    • rfc-2822: displays the time in rfc-2822 format
    • iso-8601: displays the time in iso-8601 format
    • wiki: displays the time in wiki format
  • The time parameter is optional, and can be used to get a date of other reference (like yesterday, today, tomorrow etc..) Do not use dates before 1970-01-02.

Examples

Code Result
{{FULLDATE}} October 10, 2026
{{FULLDATE|type=dmy}} 10 October 2026
{{FULLDATE|type=short}} October 10
{{FULLDATE|type=shortish}} Oct. 10, 2026
{{FULLDATE|type=medium}} October 10, 2026
{{FULLDATE|type=long}} October 10, 2026 10:05:07
{{FULLDATE|type=day}} Saturday, 10 October 2026
{{FULLDATE|type=longer}} Saturday, 10 October 2026 10:05:07 (UTC)
{{FULLDATE|type=rfc-2822}} Sat, 10 Oct 2026 10:05:07 +0000
{{FULLDATE|type=iso-8601}} 2026-10-10T10:05:07+00:00
{{FULLDATE|type=wiki}} 10:05:07, 10 October 2026 (UTC)
{{FULLDATE|type=date}} 2026-10-10
{{FULLDATE|type=date|time=yesterday}} 2026-10-09
{{FULLDATE|type=date|time=today}} 2026-10-10
{{FULLDATE|type=date|time=tomorrow}} 2026-10-11
{{FULLDATE|type=date|time=1970-01-02}} 1970-01-02
{{FULLDATE|type=date|time=1970-12-31}} 1970-12-31
{{FULLDATE|type=iso-8601|time=1970-01-01 00:00:01}} 1970-01-01T00:00:01+00:00

See also