Difference between revisions of "Winter calendar"
(winter 2.0) |
|||
Line 1: | Line 1: | ||
{{#nocache}} | {{#nocache}} | ||
+ | |||
+ | {{#comment | | ||
+ | || | ||
+ | || Initialize variables and functions | ||
+ | || | ||
+ | }} | ||
+ | |||
{{#function | ShowDay || <span style="background-color:#cccccc;;padding:.25em;margin:.5em; margin-bottom:1.5em;margin-right:.5em; width:2em;">{{#1}}</span> | {{#function | ShowDay || <span style="background-color:#cccccc;;padding:.25em;margin:.5em; margin-bottom:1.5em;margin-right:.5em; width:2em;">{{#1}}</span> | ||
}} | }} | ||
− | |||
{{#array | month | 31 | 28 | 31 | 30 | 31 | 30 | 31 | 31 | 30 | 31 | 30 | 31 }} | {{#array | month | 31 | 28 | 31 | 30 | 31 | 30 | 31 | 31 | 30 | 31 | 30 | 31 }} | ||
{{#days_in_month | @= | {{#month | {{#op {{CURRENTMONTH}} - 1 }} }} }} | {{#days_in_month | @= | {{#month | {{#op {{CURRENTMONTH}} - 1 }} }} }} | ||
{{#WeekStart | @= | {{#op | 8 - ( ( {{CURRENTDAY}} - {{CURRENTDOW}} ) mod 7 ) }} }} | {{#WeekStart | @= | {{#op | 8 - ( ( {{CURRENTDAY}} - {{CURRENTDOW}} ) mod 7 ) }} }} | ||
+ | |||
+ | {{#comment | | ||
+ | || | ||
+ | || Draw calendar | ||
+ | || | ||
+ | }} | ||
+ | |||
<div style="border:1px solid black;width:22em;text-align:center;padding-bottom:.5em"> | <div style="border:1px solid black;width:22em;text-align:center;padding-bottom:.5em"> | ||
− | + | ||
+ | {{#showday | {{CURRENTMONTHNAME}} {{CURRENTYEAR}} }} | ||
{{#for | {{#i = 0}} || {{#i | < | {{#WeekStart}} }} || {{#i ++}} | {{#for | {{#i = 0}} || {{#i | < | {{#WeekStart}} }} || {{#i ++}} | ||
|| {{#ShowDay| 00 }} | || {{#ShowDay| 00 }} | ||
}}{{#for | {{#day = 1}} || {{#day | <= | {{#days_in_month}} }} || {{#null}} | }}{{#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}} }} }} }} | + | || {{#ShowDay | {{#if | {{#day < 10}} || 0}}{{#if | {{#day | > | {{#days_in_month}} }} || 00 || {{#day}} }} }} |
+ | }} | ||
+ | |||
<div style="clear:left"> </div> | <div style="clear:left"> </div> | ||
− | {{#WeekStart @= 0}} }} | + | {{#WeekStart @= 0}} |
+ | |||
+ | }} | ||
+ | |||
</div> | </div> |
Revision as of 04:08, 11 August 2007
{{#nocache}}
{{#comment | || || 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 ) }} }}
{{#comment | || || 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}}
}}