Difference between revisions of "Winter calendar"
Line 1: | Line 1: | ||
{{#nocache}} | {{#nocache}} | ||
− | {{# | + | {{# |
− | |||
|| Initialize variables and functions | || Initialize variables and functions | ||
− | |||
}} | }} | ||
Line 13: | Line 11: | ||
{{#WeekStart | @= | {{#op | 8 - ( ( {{CURRENTDAY}} - {{CURRENTDOW}} ) mod 7 ) }} }} | {{#WeekStart | @= | {{#op | 8 - ( ( {{CURRENTDAY}} - {{CURRENTDOW}} ) mod 7 ) }} }} | ||
− | {{# | + | {{# |
− | |||
|| Draw calendar | || Draw calendar | ||
− | |||
}} | }} | ||
Revision as of 04:21, 11 August 2007
{{#nocache}}
{{# || Initialize variables and functions }}
{{#function | ShowDay || {{#1}} }} {{#array | month | 31 | 28 | 31 | 30 | 31 | 30 | 31 | 31 | 30 | 31 | 30 | 31 }} {{#days_in_month | @= | {{#month | {{#op 04 - 1 }} }} }} {{#WeekStart | @= | {{#op | 8 - ( ( 28 - 0 ) mod 7 ) }} }}
{{# || Draw calendar }}
{{#showday | April 2024 }}
{{#for | {{#i = 0}} || {{#i | < | {{#WeekStart}} }} || {{#i ++}} || {{#ShowDay| 00 }} }}{{#for | {{#day = 1}} || {{#day | <= | {{#days_in_month}} }} || {{#null}} || {{#for | {{#i | = | {{#WeekStart}} }} || {{#i < 7}} || {{#i ++}} {{#day ++}} || {{#ShowDay | {{#if | {{#day < 10}} || 0}}{{#if | {{#day | > | {{#days_in_month}} }} || 00 || {{#day}} }} }} }}
{{#WeekStart @= 0}}
}}