Difference between revisions of "Template:Datetime"
Jump to navigation
Jump to search
FireonLive (talk | contribs) m |
FireonLive (talk | contribs) (Allow template user to only specify a date) |
||
Line 1: | Line 1: | ||
{{#formatdate:{{{1}}}}} {{{2}}} {{{3}}} (UTC{{{4}}})<noinclude> | {{#formatdate:{{{1}}}}}{{#if:{{{2|}}}|{{{2}}} {{{3}}} (UTC{{{4}}})|}}<noinclude> | ||
== Help == | == Help == | ||
Takes a date and time and formats it consistently across the wiki, using the user's preferences for the date portion. | Takes a date and time and formats it consistently across the wiki, using the user's preferences for the date portion. | ||
Usage: <code><nowiki>{{datetime|ISO 8601 date|24h time|timezone|+/- from UTC}}</nowiki></code> | Usage: | ||
* Date & Time: <code><nowiki>{{datetime|ISO 8601 date|24h time|timezone|+/- from UTC}}</nowiki></code> | |||
* Date: <code><nowiki>{{datetime|ISO 8601 date}}</nowiki></code> | |||
Example: <code><nowiki>{{datetime|2023-08-28|22:00|CEST|+2}}</nowiki></code> turns in to <code>{{datetime|2023-08-28|22:00|CEST|+2}}</code> | Example: | ||
* Date & Time: <code><nowiki>{{datetime|2023-08-28|22:00|CEST|+2}}</nowiki></code> turns in to <code>{{datetime|2023-08-28|22:00|CEST|+2}}</code> | |||
* Date: <code><nowiki>{{datetime|2023-08-28}}</nowiki></code> turns in to <code>{{datetime|2023-08-28}}</code> | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 22:00, 1 September 2023
{{{1}}}
Help
Takes a date and time and formats it consistently across the wiki, using the user's preferences for the date portion.
Usage:
- Date & Time:
{{datetime|ISO 8601 date|24h time|timezone|+/- from UTC}}
- Date:
{{datetime|ISO 8601 date}}
Example:
- Date & Time:
{{datetime|2023-08-28|22:00|CEST|+2}}
turns in to2023-08-2822:00 CEST (UTC+2)
- Date:
{{datetime|2023-08-28}}
turns in to2023-08-28