Template:Dst: Difference between revisions
illerai>Temujin96 Created page with "{{#switch: {{{1|us}}} <!-- The template determines whether the current Unix timestamp is between the timestamps for the DST start and end dates. Returns a 1 if DST is current..." |
m 1 revision imported |
(No difference)
|
Latest revision as of 21:46, 2 November 2024
0
This template determines whether daylight saving time is currently in effect.
Syntax
{{dst|rule|datetime}}
Usage
This template determines whether daylight saving time is currently in effect. Since DST starts and ends at different times for different locations, three DST rules are supported: one for the US/Canada, one for Europe (which uses the same rule throughout), and one for Australia, excluding Tasmania (which is on a slightly different rule).
In North America and Australia, time switches between DST and standard at a certain local time, so this template may be a few hours early or late to update depending on your location. Time changes in all of Europe at 1:00 UTC, so this isn't an issue there.
Depending on the DST rule desired, "us", "uk", "aus" or "none" should be given as parameter to this template (defaults to "us").
By default, the DST given is for the current data and time. If the DST for a different datetime is desired, then this can be obtained by specifying the datetime string.