Difference between revisions of "Template:Sandbox"

From Free Software Directory
Jump to: navigation, search
m
m
Line 1: Line 1:
<includeonly>From [[Template:Print software category]]:
+
<!--
{{#arraymap:{{{2}}}|,|xvarx|<li>[[Category/Audio/xvarx{{!}}Audio:xvarx]]</li>|}}
+
  Based on: <https://en.wikipedia.org/w/index.php?title=Template:Daylight_saving_in_time_zone&oldid=618801821>
{{#arraymap:{{{3}}}|,|xvarx|<li>[[Category/Runs-on/xvarx{{!}}Runs-on:xvarx]]</li>|}}
 
  
From [[Template:Software category]]:
+
  HOW TO ADD A TIME ZONE
{{#arraymap:{{{2}}}|,|xvarx|{{#set:Audio=xvarx}}|}}
 
  
From [[Template:Print entry]]:
+
* Add a pipe (|) chain with all the abbreviations of the time zones
{{#arraymap:{{{2}}}|,|xvarx|<li>[[Category/Audio/xvarx|Audio:xvarx]]</li>|}}
+
  for which the same formula is used to calculate the dates at which
{{#arraymap:{{{3}}}|,|xvarx|<li>[[Category/Runs-on/xvarx|Runs-on:xvarx]]</li>|}}</includeonly>
+
  DST begins and ends, including both the standard time abbreviation(s)
 +
  and daylight saving time abbreviation for each time zone, ending the
 +
  chain with an equal sign (=) followed by the formula.
 +
 
 +
-->{{#switch:{{uc:{{{1|}}}}}
 +
 
 +
|EST|EDT=
 +
{{#ifexpr:
 +
      <!--April through October-->
 +
          ({{#time:n}} > 3  and {{#time:n}} < 11)
 +
      <!--date in March after start DST-->
 +
        or ({{#time:n}} = 3  and {{#time:j}} > {{#expr:(14 - (5*{{#time:Y}}/4 + 1) mod 7)}})
 +
      <!--date in November before end DST-->
 +
        or ({{#time:n}} = 11 and {{#time:j}} < {{#expr:(7  - (5*{{#time:Y}}/4 + 1) mod 7)}})
 +
      <!--day of start DST after 2 AM local standard time (second Sunday in March)-->
 +
        or ({{#time:n}} = 3  and {{#time:j}} = {{#expr:(14 - (5*{{#time:Y}}/4 + 1) mod 7)}} and {{#time:G|0 minutes}} >= 7)
 +
      <!--day of end DST before 2 AM local daylight saving time (first Sunday in November)-->
 +
        or ({{#time:n}} = 11 and {{#time:j}} = {{#expr:(7  - (5*{{#time:Y}}/4 + 1) mod 7)}} and {{#time:G|0 minutes}} < 6)
 +
  |1 <!--DST active-->
 +
  |0 <!--DST not active-->
 +
}}
 +
 
 +
|0
 +
}}

Revision as of 12:58, 1 February 2018

0



Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the page “GNU Free Documentation License”.

The copyright and license notices on this page only apply to the text on this page. Any software or copyright-licenses or other similar notices described in this text has its own copyright notice and license, which can usually be found in the distribution or license text itself.