Skip to content

Commit e12a6b1

Browse files
committed
fix: snek days
1 parent 1b26aeb commit e12a6b1

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

static/js/snek.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,73 @@
11
function getSeasonStyles() {
22
const today = new Date();
3-
const month = today.getMonth(); // 0-11
3+
const month = today.getMonth() + 1; // 1-12
44
const day = today.getDate();
55

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) {
307
return {
318
body: 'url(#earth-day)',
329
tongue: 'blue',
3310
};
3411
}
3512

36-
if (month === 6 && day === 21) {
13+
if (month === 7 && day === 22) {
3714
return {
3815
body: 'url(#party)',
3916
tongue: 'purple',
4017
};
4118
}
4219

43-
if (month == 2 && day == 30) {
20+
if (month == 3 && day == 31) {
4421
return {
4522
body: 'url(#visibility)',
4623
tongue: 'purple',
4724
};
4825
}
4926

50-
if (month === 2 && day === 7) {
27+
if (month === 3 && day === 8) {
5128
return {
5229
body: 'pink',
5330
tongue: 'red',
5431
};
5532
}
5633

57-
if (month === 10 && day === 18) {
34+
if (month === 11 && day === 19) {
5835
return {
5936
body: 'lightblue',
6037
tongue: 'blue',
6138
};
6239
}
6340

64-
if (month == 2 && day == 17) {
41+
if (month == 3 && day == 17) {
6542
return {
6643
body: 'lightgreen',
6744
tongue: 'green',
6845
};
6946
}
7047

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+
7171
// Easter: March/April (needs to be calculated as it changes)
7272
// Function to calculate Easter for the current year
7373
function getEaster(year) {

0 commit comments

Comments
 (0)