style="vertical-align:middle; text-align:center;" Imbox_deletion.png ATTENTION! The process of updating WiKi to version Eco 10.x has begun. Those wishing to participate can find out more Information on our ECO Contribution Wiki Discord.
From April 26 to May 12, errors may occur in the Wiki, as we will be carrying out a major update to the information processing modules.

Template:Datetime/doc

From Eco - English Wiki

Template:Doc/start

Add the "time" HTML element around a date, time, or date & time text for better search engine results and to help people using accessibility technologies.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Datetime1

String with a date, time, or date and time.

Example
2022-12-31, 23:21:59, 2000-01-02T03:04:05.006
Stringrequired
Display text2

Text to display instead of the date or time.

Example
last year, tomorrow, January 1st, in February
Stringoptional

Please refer to the <time>: The (Date) Time element on MDN Web Docs for the exact specification of the datetime string and more examples.

Usage[edit source]

  • With date only: {{Datetime|datetime}}
  • With date and text: {{Datetime|datetime|display text}}

Examples[edit source]

Usage examples, including an invalid one.
Code Result
{{Datetime|2022-01-02}}
{{Datetime|2022-02-01|On February 1st}}
{{Datetime|12:30|half past noon}}
{{Datetime|2022-01-01T00:00:01}}
{{Datetime}} ERROR: No value given to datetime template!

Template:Doc/end