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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Datetime | 1 | String with a date, time, or date and time.
| String | required |
Display text | 2 | Text to display instead of the date or time.
| String | optional |
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]
Examples[edit source]
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! |