Difference between revisions of "User:Sunmarsh/Sandbox/Orange"

From Nookipedia, the Animal Crossing wiki
m (Template will now properly display leap year days)
m (Calendar cell values from 1-9 now have leading zeroes to aid in template call compatibility with previous Calendar template)
Line 48: Line 48:
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V1}} > 6 | {{Colorshow|bdbdbd|{{#var:V1}}}} | {{#var:V1}}}}</big>
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V1}} > 6 | {{Colorshow|bdbdbd|{{#var:V1}}}} | {{#var:V1}}}}</big>
 
|-
 
|-
| {{#var:cellstyle3}} {{{1|}}}
+
| {{#var:cellstyle3}} {{{01|}}}
 
|}
 
|}
 
| {{#var:cellstyle1}}{{#ifexpr:{{#var:V2}} > 6 | f1f1f1 | ffffff}}; {{roundy|5px}};" |
 
| {{#var:cellstyle1}}{{#ifexpr:{{#var:V2}} > 6 | f1f1f1 | ffffff}}; {{roundy|5px}};" |
Line 54: Line 54:
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V2}} > 6 | {{Colorshow|bdbdbd|{{#var:V2}}}} | {{#var:V2}}}}</big>
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V2}} > 6 | {{Colorshow|bdbdbd|{{#var:V2}}}} | {{#var:V2}}}}</big>
 
|-
 
|-
| {{#var:cellstyle3}} {{{2|}}}
+
| {{#var:cellstyle3}} {{{02|}}}
 
|}
 
|}
 
| {{#var:cellstyle1}}{{#ifexpr:{{#var:V3}} > 6 | f1f1f1 | ffffff}}; {{roundy|5px}};" |
 
| {{#var:cellstyle1}}{{#ifexpr:{{#var:V3}} > 6 | f1f1f1 | ffffff}}; {{roundy|5px}};" |
Line 60: Line 60:
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V3}} > 6 | {{Colorshow|bdbdbd|{{#var:V3}}}} | {{#var:V3}}}}</big>
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V3}} > 6 | {{Colorshow|bdbdbd|{{#var:V3}}}} | {{#var:V3}}}}</big>
 
|-
 
|-
| {{#var:cellstyle3}} {{{3|}}}
+
| {{#var:cellstyle3}} {{{03|}}}
 
|}
 
|}
 
| {{#var:cellstyle1}}{{#ifexpr:{{#var:V4}} > 6 | f1f1f1 | ffffff}}; {{roundy|5px}};" |
 
| {{#var:cellstyle1}}{{#ifexpr:{{#var:V4}} > 6 | f1f1f1 | ffffff}}; {{roundy|5px}};" |
Line 66: Line 66:
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V4}} > 6 | {{Colorshow|bdbdbd|{{#var:V4}}}} | {{#var:V4}}}}</big>
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V4}} > 6 | {{Colorshow|bdbdbd|{{#var:V4}}}} | {{#var:V4}}}}</big>
 
|-
 
|-
| {{#var:cellstyle3}} {{{4|}}}
+
| {{#var:cellstyle3}} {{{04|}}}
 
|}
 
|}
 
| {{#var:cellstyle1}}{{#ifexpr:{{#var:V5}} > 6 | f1f1f1 | ffffff}}; {{roundy|5px}};" |
 
| {{#var:cellstyle1}}{{#ifexpr:{{#var:V5}} > 6 | f1f1f1 | ffffff}}; {{roundy|5px}};" |
Line 72: Line 72:
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V5}} > 6 | {{Colorshow|bdbdbd|{{#var:V5}}}} | {{#var:V5}}}}</big>
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V5}} > 6 | {{Colorshow|bdbdbd|{{#var:V5}}}} | {{#var:V5}}}}</big>
 
|-
 
|-
| {{#var:cellstyle3}} {{{5|}}}
+
| {{#var:cellstyle3}} {{{05|}}}
 
|}
 
|}
 
| {{#var:cellstyle1}}{{#ifexpr:{{#var:V6}} > 6 | f1f1f1 | ffffff}}; {{roundy|5px}};" |
 
| {{#var:cellstyle1}}{{#ifexpr:{{#var:V6}} > 6 | f1f1f1 | ffffff}}; {{roundy|5px}};" |
Line 78: Line 78:
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V6}} > 6 | {{Colorshow|bdbdbd|{{#var:V6}}}} | {{#var:V6}}}}</big>
 
| {{#var:cellstyle2}} <big>{{#ifexpr:{{#var:V6}} > 6 | {{Colorshow|bdbdbd|{{#var:V6}}}} | {{#var:V6}}}}</big>
 
|-
 
|-
| {{#var:cellstyle3}} {{{6|}}}
+
| {{#var:cellstyle3}} {{{06|}}}
 
|}
 
|}
 
|-
 
|-
Line 85: Line 85:
 
| {{#var:cellstyle2}} <big>{{#var:V7}}</big>
 
| {{#var:cellstyle2}} <big>{{#var:V7}}</big>
 
|-
 
|-
| {{#var:cellstyle3}} {{{7|}}}
+
| {{#var:cellstyle3}} {{{07|}}}
 
|}
 
|}
 
| {{#var:cellstyle1}}ffffff; {{roundy|5px}};" |
 
| {{#var:cellstyle1}}ffffff; {{roundy|5px}};" |
Line 91: Line 91:
 
| {{#var:cellstyle2}} <big>{{#var:V8}}</big>
 
| {{#var:cellstyle2}} <big>{{#var:V8}}</big>
 
|-
 
|-
| {{#var:cellstyle3}} {{{8|}}}
+
| {{#var:cellstyle3}} {{{08|}}}
 
|}
 
|}
 
| {{#var:cellstyle1}}ffffff; {{roundy|5px}};" |
 
| {{#var:cellstyle1}}ffffff; {{roundy|5px}};" |
Line 97: Line 97:
 
| {{#var:cellstyle2}} <big>{{#var:V9}}</big>
 
| {{#var:cellstyle2}} <big>{{#var:V9}}</big>
 
|-
 
|-
| {{#var:cellstyle3}} {{{9|}}}
+
| {{#var:cellstyle3}} {{{09|}}}
 
|}
 
|}
 
| {{#var:cellstyle1}}ffffff; {{roundy|5px}};" |
 
| {{#var:cellstyle1}}ffffff; {{roundy|5px}};" |

Revision as of 17:09, January 10, 2021

← September October 2024 November →
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2

Calculate the difference between calendar value x and the start date value (numeral associated with the day of the week the month starts on), and add 1. If the result of this expression is less than one, then the calendar value is part of the previous month. For these calendar values, take the number of days in the previous month and add to them the result of the following expression: calendar value x - the start date value + 1. If the result of the expression in the first sentence is 1 or greater then determine if calendar value x is equal to or greater than the sum of the number of days in the current month and the start date value. If so, then the calendar value is part of the following month. For these calendar values, subtract the sum of the number of days in the current month and the start date value from calendar value x and add 1. For all other values (the calendar values associated with the days of the current month), calculate the difference between calendar value x and the start date value and add 1.

To determine whether or not the calendar should display a given week, find the sum of these variables: the number of days in the current month, the start date value, and six minus the end date value. Whether or not the week is displayed is dependent on whether this value exceeds 28 (for a fifth week), and then 35 (for a sixth week).