Template:Utc: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Stephen Ewen
(New page: <includeonly>{{#time:H:i|{{#expr:{{{1|0}}} * 60 + {{{2|0}}} round 0}} minutes}}</includeonly> <noinclude> ; Dependency Is dependent with {{Tl|Usertime}} ; Usage: {{tl|{{PAGENAME}}}} take...)
 
imported>Stephen Ewen
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#time:H:i|{{#expr:{{{1|0}}} * 60 + {{{2|0}}} round 0}} minutes}}</includeonly>
<includeonly>'''{{#time:H:i|{{#expr:{{{1|0}}} * 60 + {{{2|0}}} round 0}} minutes}}'''</includeonly>
 
<noinclude>
; Dependency
Is dependent with {{Tl|Usertime}}
 
; Usage:
{{tl|{{PAGENAME}}}} takes the current UTC time from the server, and applies an optional time offset in hours (or hours and minutes). It returns the computed local time in 24-hour format (''hh:mm'').
 
; Syntax<nowiki>:</nowiki>
: <tt><nowiki>{{</nowiki>Template:Utc<nowiki>|</nowiki>''[hours]''<nowiki>|</nowiki>''[minutes]''<nowiki>}}</nowiki></tt>
* The ''hours'' parameter (optional, default 0) is normally negative for America and West Pacific, it is null or positive in Europe, Africa, Asia and East Pacific.
* The ''minutes'' parameter (optional, default 0) is null for most timezones, but 30 minutes occur in some places, sometimes because of daylight. Use negative values for western timezones that need it.
* Non integers are accepted for both parameters, but this will be typically used only for ''hours'' offsets from UTC.
 
; Examples<nowiki>:</nowiki>
: <tt><nowiki>{{</nowiki>Template:Utc<nowiki>}}</nowiki></tt> = "{{Utc}}".
: <tt><nowiki>{{</nowiki>Template:Utc<nowiki>|</nowiki>-4<nowiki>}}</nowiki></tt> = "{{Utc|-4}}".
: <tt><nowiki>{{</nowiki>Template:Utc<nowiki>|</nowiki>2<nowiki>}}</nowiki></tt> = "{{Utc|2}}".
: <tt><nowiki>{{</nowiki>Template:Utc<nowiki>|</nowiki>6.5<nowiki>}}</nowiki></tt> = "{{Utc|6.5}}".
: <tt><nowiki>{{</nowiki>Template:Utc<nowiki>|</nowiki>6<nowiki>|</nowiki>30<nowiki>}}</nowiki></tt> = "{{Utc|6|30}}".

Latest revision as of 22:15, 22 October 2007