Difference between revisions of "Template:Current daylight saving offset in North America"

From blackwiki
Jump to navigation Jump to search
imported>Sceptre
m (some)
imported>Jimp
Line 1: Line 1:
{{#expr: {{CURRENTYEAR}}03{{#ifexpr: {{Nth weekday of month|{{CURRENTYEAR}}|3|0|2}} < 10 | 0}}{{Nth weekday of month|{{CURRENTYEAR}}|3|0|2}}{{#switch:{{{offset}}}|-3.5|-3:30=05|-4=06|-5=07|-6=08|-7=09|-8=10|-9=11|-10=12|#default=06}}{{#switch:{{{offset}}}|-3.5|-3:30=30|#default=00}}00 < {{CURRENTTIMESTAMP}} and {{CURRENTTIMESTAMP}} <= {{CURRENTYEAR}}110{{Nth weekday of month|{{CURRENTYEAR}}|11|0|1}}{{#switch:{{{offset}}}|-3.5|-3:30=05|-4=06|-5=07|-6=08|-7=09|-8=10|-9=11|-10=12|#default=06}}{{#switch:{{{offset}}}|-3.5|-3:30=30|#default=00}}00}}
+
{{#expr: {{CURRENTYEAR}}03{{#ifexpr: {{weekday in month|second|sunday|march|{{CURRENTYEAR}}}} < 10 | 0}}{{weekday in month|second|sunday|march|{{CURRENTYEAR}}}}{{#switch:{{{offset}}}|-3.5|-3:30=05|-4=06|-5=07|-6=08|-7=09|-8=10|-9=11|-10=12|#default=06}}{{#switch:{{{offset}}}|-3.5|-3:30=30|#default=00}}00 < {{CURRENTTIMESTAMP}} and {{CURRENTTIMESTAMP}} <= {{CURRENTYEAR}}110{{weekday in month|first|sunday|november|{{CURRENTYEAR}}}}{{#switch:{{{offset}}}|-3.5|-3:30=05|-4=06|-5=07|-6=08|-7=09|-8=10|-9=11|-10=12|#default=06}}{{#switch:{{{offset}}}|-3.5|-3:30=30|#default=00}}00}}
 
<noinclude>
 
<noinclude>
 
----
 
----

Revision as of 05:08, 18 July 2008

Expression error: Unrecognized word "strong".


This template automatically changes twice a year, changing to "1" on the second Sunday of March at 2:00am LT and changing to "0" on the first Sunday of November at 2:00am LT.

The parameter "offset" is for alternate UTC offsets and takes the values "-3.5", "-3:30", and any integer between "-4" and "-10". It defaults to EST.