Difference between revisions of "Template:Usdst"
From Geohashing
imported>Tjtrumpet2323 (New page: {{#vardefine:year|{{#time:Y|{{{1|{{CURRENTTIMESTAMP}}}}} }}}}{{#vardefine:remainder|{{#time:mdHi|{{{1|{{CURRENTTIMESTAMP}}}}} }}}}{{#ifexpr: {{#var:year}} <= 2006 | {{#ifexpr: ({{#var:rema...) |
imported>Tjtrumpet2323 |
||
Line 1: | Line 1: | ||
{{#vardefine:year|{{#time:Y|{{{1|{{CURRENTTIMESTAMP}}}}} }}}}{{#vardefine:remainder|{{#time:mdHi|{{{1|{{CURRENTTIMESTAMP}}}}} }}}}{{#ifexpr: {{#var:year}} <= 2006 | {{#vardefine:year|{{#time:Y|{{{1|{{CURRENTTIMESTAMP}}}}} }}}}{{#vardefine:remainder|{{#time:mdHi|{{{1|{{CURRENTTIMESTAMP}}}}} }}}}{{#ifexpr: {{#var:year}} <= 2006 | ||
− | | {{# | + | | {{#expr: ({{#var:remainder}} >= {{#expr:04{{padleft:{{weekday in month|{{#var:year}}|4|0|1}}|2|0}}0700}}) and ({{#var:remainder}} < {{#expr:10{{padleft:{{weekday in month|{{#var:year}}|10|0|-1}}|2|0}}0600}}) }} |
− | | {{# | + | | {{#expr: ({{#var:remainder}} >= {{#expr:03{{padleft:{{weekday in month|{{#var:year}}|3|0|2}}|2|0}}0700}}) and ({{#var:remainder}} < {{#expr:11{{padleft:{{weekday in month|{{#var:year}}|11|0|1}}|2|0}}0600}}) }} |
}}<noinclude> | }}<noinclude> | ||
== Usage == | == Usage == |
Revision as of 05:07, 3 July 2008
0
Usage
This template employs features of template syntax, some of which may be too intricate for novices. Please discuss any shortcomings or faults of this template on its talk page before making any changes. You are also encouraged to contact the original creator via their user page prior to editing this template. If changes are necessary, please familiarise yourself with the template’s setup and WikiMedia parser functions before attempting to edit, or contact someone with knowledge of template syntax.
If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. |
{{usdst}}
- Returns 1 if the United States (specifically its Eastern Time Zone) are in Daylight Saving Time, 0 if not.
- From 2007, Daylight Saving Time is observed in the United States from 02:00 local (07:00 UTC) on the second Sunday in March through 02:00 local (06:00 UTC) on the first Sunday in November.
- For simplicity's sake, this template applies DST rules used from 1987-2006 to all years 1986 and prior.
- This template currently extends the current (2007) DST rules to all years following. Further DST legislation in the United States may require updates to this template.