Difference between revisions of "Template:GetDate/Old"

From Sim Football Wiki
Jump to navigation Jump to search
(working)
 
Line 1: Line 1:
* find which day of the week january 1st of given year was
+
{{#time: Y-m-d | @{{#time: U | {{nsfly|{{{1|1}}}|nolink}}-01-0{{GetDate/FirstSunday|{{{1|1}}}}} }} +{{#if:{{{2|}}}|
* adjust to find the first sunday
 
* get the number of weeks to add based on second parameter (switch statement)
 
* return the result
 
 
 
<!-- To get epoch time: INT(#DATE_TO_CALC#-DATE(1970,1,1))*86400 -->
 
 
 
<!--
 
{{#expr: {{#expr: 1 + {{#expr: {{#expr: 7 - {{#expr: 1 + 26 + {{#expr: floor(3*14/5) }} + 2016-1 + {{#expr: floor(2016-1/4) }} - {{#expr: floor(2016-1/100) }} + {{#expr: floor(2016-1/400) }} + 2 }} }} mod 7 }} }} + 1 }}
 
-->
 
 
 
<!--
 
 
{{#switch: {{{2}}}
 
{{#switch: {{{2}}}
 
|P1        = 34
 
|P1        = 34
Line 44: Line 33:
 
|Final      = 55
 
|Final      = 55
 
}}
 
}}
-->
+
|0}} week}}
 +
<noinclude>{{documentation}}</noinclude>

Revision as of 09:33, 5 July 2019

2016-01-03