|
1 | 1 | function getSeasonStyles() { |
2 | 2 | const today = new Date(); |
3 | | - const month = today.getMonth(); // 0-11 |
| 3 | + const month = today.getMonth() + 1; // 1-12 |
4 | 4 | const day = today.getDate(); |
5 | 5 |
|
6 | | - // Halloween: October |
7 | | - if (month === 9) { |
8 | | - return { |
9 | | - body: 'url(#spider-web)', |
10 | | - tongue: 'black', |
11 | | - }; |
12 | | - } |
13 | | - |
14 | | - // Christmas: December and first week of January |
15 | | - if (month === 11 || (month === 0 && day <= 7)) { |
16 | | - return { |
17 | | - body: 'url(#candy-cane)', |
18 | | - tongue: 'red', |
19 | | - }; |
20 | | - } |
21 | | - |
22 | | - if (month === 5) { |
23 | | - return { |
24 | | - body: 'url(#pride)', |
25 | | - tongue: 'url(#progress)', |
26 | | - }; |
27 | | - } |
28 | | - |
29 | | - if (month === 3 && day === 21) { |
| 6 | + if (month === 4 && day === 21) { |
30 | 7 | return { |
31 | 8 | body: 'url(#earth-day)', |
32 | 9 | tongue: 'blue', |
33 | 10 | }; |
34 | 11 | } |
35 | 12 |
|
36 | | - if (month === 6 && day === 21) { |
| 13 | + if (month === 7 && day === 22) { |
37 | 14 | return { |
38 | 15 | body: 'url(#party)', |
39 | 16 | tongue: 'purple', |
40 | 17 | }; |
41 | 18 | } |
42 | 19 |
|
43 | | - if (month == 2 && day == 30) { |
| 20 | + if (month == 3 && day == 31) { |
44 | 21 | return { |
45 | 22 | body: 'url(#visibility)', |
46 | 23 | tongue: 'purple', |
47 | 24 | }; |
48 | 25 | } |
49 | 26 |
|
50 | | - if (month === 2 && day === 7) { |
| 27 | + if (month === 3 && day === 8) { |
51 | 28 | return { |
52 | 29 | body: 'pink', |
53 | 30 | tongue: 'red', |
54 | 31 | }; |
55 | 32 | } |
56 | 33 |
|
57 | | - if (month === 10 && day === 18) { |
| 34 | + if (month === 11 && day === 19) { |
58 | 35 | return { |
59 | 36 | body: 'lightblue', |
60 | 37 | tongue: 'blue', |
61 | 38 | }; |
62 | 39 | } |
63 | 40 |
|
64 | | - if (month == 2 && day == 17) { |
| 41 | + if (month == 3 && day == 17) { |
65 | 42 | return { |
66 | 43 | body: 'lightgreen', |
67 | 44 | tongue: 'green', |
68 | 45 | }; |
69 | 46 | } |
70 | 47 |
|
| 48 | + if (month === 6) { |
| 49 | + return { |
| 50 | + body: 'url(#pride)', |
| 51 | + tongue: 'url(#progress)', |
| 52 | + }; |
| 53 | + } |
| 54 | + |
| 55 | + // Halloween: October |
| 56 | + if (month === 10) { |
| 57 | + return { |
| 58 | + body: 'url(#spider-web)', |
| 59 | + tongue: 'black', |
| 60 | + }; |
| 61 | + } |
| 62 | + |
| 63 | + // Christmas: December and first week of January |
| 64 | + if (month === 12 || (month === 1 && day <= 7)) { |
| 65 | + return { |
| 66 | + body: 'url(#candy-cane)', |
| 67 | + tongue: 'red', |
| 68 | + }; |
| 69 | + } |
| 70 | + |
71 | 71 | // Easter: March/April (needs to be calculated as it changes) |
72 | 72 | // Function to calculate Easter for the current year |
73 | 73 | function getEaster(year) { |
|
0 commit comments