Difference between revisions of "Template:Datetime"
Jump to navigation
Jump to search
Switchnode (talk | contribs) (require zones for times) |
Switchnode (talk | contribs) m (fix spacing) |
||
Line 1: | Line 1: | ||
<includeonly>{{#formatdate: {{{1}}} }} {{#if: {{{2|}}} | <includeonly>{{#formatdate: {{{1}}} }}{{#if: {{{2|}}} | ||
| {{{2}}} {{#if: {{{3|}}} | | <nowiki/> {{{2}}} {{#if: {{{3|}}} | ||
| {{#ifeq: {{uc: {{{3}}} }} | UTC | | {{#ifeq: {{uc: {{{3}}} }} | UTC | ||
| UTC | | UTC |
Latest revision as of 18:10, 3 May 2024
Help
Takes a date and time and formats it consistently across the wiki, using the user's preferences for the date portion.
Usage:
- Date:
{{datetime|ISO 8601 date}}
- Date & Time:
{{datetime|ISO 8601 date|24h time|timezone|+/- from UTC}}
or{{datetime|ISO 8601 date|24h time|UTC}}
Example:
- Date:
{{datetime|2023-08-28}}
turns into2023-08-28
- Date & Time:
{{datetime|2023-08-28|22:00|CEST|+2}}
turns into2023-08-28 22:00 CEST (UTC+2)
{{datetime|2023-08-28|22:00|CEST}}
turns into2023-08-28 22:00 CEST Zone offset not specified
{{datetime|2023-10-01|13:37}}
turns into2023-10-01 13:37 Zone not specified
{{datetime|2024-05-03|08:19|UTC}}
turns into2023-05-03 08:19 UTC
{{datetime|2024-05-03|08:19|utc}}
turns into2023-05-03 08:19 UTC