Difference between revisions of "Template:ACKsessionDayOfMonth"

From Hackerspace ACKspace
Jump to: navigation, search
(updated magic: show next date if the current has already passed (TODO: check if timezones and/or actual date gives problems))
m (Moved from second to last to last last saturday)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>:Shows the second to last Saturday (on odd months) or Sunday (on even months):
+
<noinclude>:Shows the second to last Saturday:
 
:</noinclude>{{#ifexpr:
 
:</noinclude>{{#ifexpr:
 
{{#time: U |
 
{{#time: U |
     {{#ifexpr: {{CURRENTMONTH}} mod 2 = 1
+
     {{NthDayOfMonth|nth=0}}
    |{{NthDayOfMonth|nth=-1}}
 
    |{{NthDayOfMonth|nth=-1|day=0}}
 
    }}
 
 
}}
 
}}
 
>
 
>
 
{{#time: U | now }}
 
{{#time: U | now }}
| {{#ifexpr: {{CURRENTMONTH}} mod 2 = 1
+
| {{NthDayOfMonth|nth=0}}
    |{{NthDayOfMonth|nth=-1}}
+
| {{NthDayOfMonth|nth=0|month={{#time: m|now + 4 weeks}}|year={{#time: Y|now + 4 weeks}}}}
    |{{NthDayOfMonth|nth=-1|day=0}}
 
    }}
 
| {{#ifexpr: {{#time: m|now + 4 weeks}} mod 2 = 1
 
    |{{NthDayOfMonth|nth=-1|month={{#time: m|now + 4 weeks}}|year={{#time: Y|now + 4 weeks}}}}
 
    |{{NthDayOfMonth|nth=-1|day=0|month={{#time: m|now + 4 weeks}}|year={{#time: Y|now + 4 weeks}}}}
 
    }}
 
 
}}
 
}}

Latest revision as of 08:43, 3 April 2023

Shows the second to last Saturday:
25-05-2024