Difference between revisions of "Template:Date"

From WikiMe @ iroiro.io
Jump to: navigation, search
ink>Heddy
(Created template.)
 
ink>Heddy
(documented some details)
Line 1: Line 1:
 
<includeonly>{{#dateformat:{{{1}}}|dmy}}</includeonly><noinclude>
 
<includeonly>{{#dateformat:{{{1}}}|dmy}}</includeonly><noinclude>
This template will automatically format input dates to suit a user's preferences. The preferences can be changed at [[Special:Preferences]].
+
This template will automatically format dates to suit a user's preferences. The preferences can be changed at [[Special:Preferences]].
  
For logged-out users (these users cannot choose a preference), the date format will default to '''d mmmm yyyy''' ({{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}})
+
For logged-out users and users who did not choose a preference, the date format will default to '''d mmmm yyyy''' ({{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}).
  
 
== Usage ==
 
== Usage ==
 
{{t|date|date}}
 
{{t|date|date}}
  
For ''<date>'', enter the date in the format '''yyyy-mm-dd''' ({{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}).
+
For ''<date>'', enter the date in ISO 8601 format: '''yyyy-mm-dd''' ({{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}).
 
[[Category:Formatting Templates]]
 
[[Category:Formatting Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 16:27, 18 August 2018

This template will automatically format dates to suit a user's preferences. The preferences can be changed at Special:Preferences.

For logged-out users and users who did not choose a preference, the date format will default to d mmmm yyyy (22 December 2025).

Usage

Template:T

For <date>, enter the date in ISO 8601 format: yyyy-mm-dd (2025-12-22).