Template:Inabun/learn2wiki/template:utctest

From Discworld MUD Wiki
Jump to: navigation, search

Pieces for testing, remove text when done.

references here:
https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23time
http://www.timeanddate.com/worldclock/converter.html?iso=20200126T000000&p1=tz_gmt&p2=tz_cet&p3=tz_et&p4=tz_pst

Sat, 19 Sep 2020 12:33:35 +0000

curr yr: 2020

curr mo: 09

curr day: 19

curr hr: 12

curr min: 33

curr timestamp: 20200919123335

local timestamp: 20200919083335

time parser: 20200919123335

time parser: 20200126111500

Use these two above? if
{{utctest}}
is used, return result of
{{#time: YmdHis | now}}
, if
{{utctest| 1 jan 2020
 20:15}}
is used, then conditionally send that to parser?

Also, can we make a wrapper template that parses the time stamp from the parser and makes url for timeanddate web?

[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]

[edit]

Documentation