Difference between revisions of "Template:Time"

From WikiMe @ iroiro.io
Jump to: navigation, search
ink>Heddy
m (Heddy moved page Template:UTC to Template:Time without leaving a redirect)
ink>Heddy
(Used #time parser function)
Line 1: Line 1:
<span class="explain" title="Click to see in local time">[http://www.timeanddate.com/worldclock/fixedtime.html?hour={{{hour|{{{1|{{CURRENTHOUR}}}}}}}}&min={{{minute|{{{2|0}}}}}}&sec={{{second|0}}}{{#if:{{{day|}}}|&day={{{day}}}&month={{{month}}}&year={{{year}}}}} {{{hour|{{{1|{{CURRENTHOUR}}}}}}}}:{{{minute|{{{2|00}}}}}} UTC]</span><noinclude>
+
<includeonly>[https://www.timeanddate.com/worldclock/fixedtime.html?iso={{#time: Ymd"T"His | {{{1}}} }} {{#time: H:i e | {{{1}}} }}]</includeonly><noinclude>
 +
This template is used to keep time formatted consistently across the wiki.
  
 
== Usage ==
 
== Usage ==
{{t|UTC|hours (24 clock)|minutes}}
+
<pre>{{time|hh:mm}}</pre>
  
<nowiki>{{</nowiki>'''UTC'''&#124;<font color="gray">''hour=16''</font>&#124;<font color="gray">''minute=30''</font>&#124;<font color="gray">''year=2015''</font>&#124;<font color="gray">''month=12''</font>&#124;<font color="gray">''day=31''</font>}}
+
Enter time in the format: '''hh:mm''' ({{#time: H }}:{{#time: i }}).
  
Use to label UTC date stamps.
+
If a time zone is provided, the time will be converted to the UTC time standard. If a date is included, only the time will be displayed.
[[Category:Templates]]
+
: For example, <code><nowiki>{{time|2018-01-13 15:00 JST}}</nowiki></code> will be converted to {{time|2018-01-13 15:00 JST}}.
 +
[[Category:Formatting Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 23:44, 18 August 2018

This template is used to keep time formatted consistently across the wiki.

Usage

{{time|hh:mm}}

Enter time in the format: hh:mm (10:01).

If a time zone is provided, the time will be converted to the UTC time standard. If a date is included, only the time will be displayed.

For example, {{time|2018-01-13 15:00 JST}} will be converted to 06:00 UTC.