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))
(Removed sunday magic)
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=-1}}
    |{{NthDayOfMonth|nth=-1}}
 
    |{{NthDayOfMonth|nth=-1|day=0}}
 
    }}
 
 
}}
 
}}
 
>
 
>
 
{{#time: U | now }}
 
{{#time: U | now }}
| {{#ifexpr: {{CURRENTMONTH}} mod 2 = 1
+
| {{NthDayOfMonth|nth=-1}}
    |{{NthDayOfMonth|nth=-1}}
+
| {{NthDayOfMonth|nth=-1|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}}}}
 
    }}
 
 
}}
 
}}

Revision as of 18:38, 18 July 2022

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