-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHoliday.js
149 lines (147 loc) · 6.74 KB
/
Holiday.js
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
function Holiday() {
if (month == 10 && day == 24 && year == 2022) {
return " Happy Thanksgiving!";
} else if (month == 10 && day == 23 && year == 2023) {
return " Happy Thanksgiving!";
} else if (month == 10 && day == 28 && year == 2024) {
return " Happy Thanksgiving!";
} else if (month == 10 && day == 27 && year == 2025) {
return " Happy Thanksgiving!";
} else if (month == 10 && day == 26 && year == 2026) {
return " Happy Thanksgiving!";
} else if (month == 10 && day == 25 && year == 2027) {
return " Happy Thanksgiving!";
} else if (month == 10 && day == 23 && year == 2028) {
return " Happy Thanksgiving!";
} else if (month == 10 && day == 22 && year == 2029) {
return " Happy Thanksgiving!";
} else if (month == 10 && day == 28 && year == 2030) {
return " Happy Thanksgiving!";
} else if (month == 10 && day == 27 && year == 2031) {
return " Happy Thanksgiving!";
} else if (month == 10 && day == 25 && year == 2032) {
return " Happy Thanksgiving!";
} else if (month == 1 && day == 1 && year == 2022) {
return "Happy Lunar New Year!";
} else if (month == 0 && day == 22 && year == 2023) {
return "Happy Lunar New Year!";
} else if (month == 1 && day == 10 && year == 2024) {
return "Happy Lunar New Year!";
} else if (month == 0 && day == 29 && year == 2025) {
return "Happy Lunar New Year!";
} else if (month == 1 && day == 17 && year == 2026) {
return "Happy Lunar New Year!";
} else if (month == 1 && day == 7 && year == 2027) {
return "Happy Lunar New Year!";
} else if (month == 0 && day == 26 && year == 2028) {
return "Happy Lunar New Year!";
} else if (month == 1 && day == 13 && year == 2029) {
return "Happy Lunar New Year!";
} else if (month == 1 && day == 2 && year == 2030) {
return "Happy Lunar New Year!";
} else if (month == 5 && day == 19 && year == 2022) {
return "Happy Father's Day!";
} else if (month == 5 && day == 18 && year == 2023) {
return "Happy Father's Day!";
} else if (month == 5 && day == 16 && year == 2024) {
return "Happy Father's Day!";
} else if (month == 5 && day == 15 && year == 2025) {
return "Happy Father's Day!";
} else if (month == 5 && day == 21 && year == 2026) {
return "Happy Father's Day!";
} else if (month == 5 && day == 20 && year == 2027) {
return "Happy Father's Day!";
} else if (month == 5 && day == 18 && year == 2028) {
return "Happy Father's Day!";
} else if (month == 5 && day == 17 && year == 2029) {
return "Happy Father's Day!";
} else if (month == 5 && day == 16 && year == 2030) {
return "Happy Father's Day!";
} else if (month == 4 && day == 8 && year == 2022) {
return "Happy Mother's Day!";
} else if (month == 4 && day == 14 && year == 2023) {
return "Happy Mother's Day!";
} else if (month == 4 && day == 12 && year == 2024) {
return "Happy Mother's Day!";
} else if (month == 4 && day == 11 && year == 2025) {
return "Happy Mother's Day!";
} else if (month == 4 && day == 10 && year == 2026) {
return "Happy Mother's Day!";
} else if (month == 4 && day == 9 && year == 2027) {
return "Happy Mother's Day!";
} else if (month == 4 && day == 14 && year == 2028) {
return "Happy Mother's Day!";
} else if (month == 4 && day == 13 && year == 2029) {
return "Happy Mother's Day!";
} else if (month == 4 && day == 12 && year == 2030) {
return "Happy Mother's Day!";
}else if (month == 3 && day == 17 && year == 2022) {
return "Happy Easter!";
} else if (month == 3 && day == 9 && year == 2023) {
return "Happy Easter!";
} else if (month == 2 && day == 31 && year == 2024) {
return "Happy Easter!";
} else if (month == 3 && day == 20 && year == 2025) {
return "Happy Easter!";
} else if (month == 3 && day == 5 && year == 2026) {
return "Happy Easter!";
} else if (month == 2 && day == 28 && year == 2027) {
return "Happy Easter!";
} else if (month == 3 && day == 16 && year == 2028) {
return "Happy Easter!";
} else if (month == 3 && day == 1 && year == 2029) {
return "Happy Easter!";
} else if (month == 3 && day == 21 && year == 2030) {
return "Happy Easter!";
} else if (month == 3 && day == 13 && year == 2031) {
return "Happy Easter!";
} else if (month == 2 && day == 28 && year == 2032) {
return "Happy Easter!";
} else if (month == 9 && day == 31) {
return "Happy Halloween!";
} else if (month == 11 && day == 25) {
return "Merry Christmas!";
}else if (month == 1 && day == 14) {
return "Happy Valentine's Day!";
}else if (month == 6 && day == 19) {
return "Celebrate Juneteenth!";
}else if (month == 10 && day == 11) {
return "Happy Veterans Day!";
} else if (month == 11 && day == 24) {
return "Merry Christmas Eve!";
} else if (month == 11 && day == 31) {
return "Happy New Year's Eve!";
} else if (month == 0 && day == 1) {
return "Happy New Year!";
} else if (month == 6 && day == 4) {
return "Happy Fourth of July!";
} else if (month == 4 && day == 4) {
return "May the 4th be with you!";
} else if (month == 2 && day == 17) {
return "Happy St. Patrick's Day!";
} else if (month == 4 && day == 5) {
return "Happy Cinco de Mayo!";
}else if (month == 10 && day == 1) {
return "Happy Día de los Muertos!";
}else if ((year) == 2022 && month == 11 && (day > 18 && day < 23)) {
return "Happy Hanukkah!";
} else if ((year) == 2023 && month == 11 && (day > 7 && day < 15)) {
return "Happy Hanukkah!";
} else if ((year) == 2024 && month == 11 && (day > 26 && day < 30)) {
return "Happy Hanukkah!";
} else if ((year) == 2025 && month == 11 && (day > 14 && day < 22)) {
return "Happy Hanukkah!";
} else if ((year) == 2026 && month == 11 && (day > 4 && day < 12)) {
return "Happy Hanukkah!";
} else if ((year) == 2027 && month == 11 && (day > 26 && day < 30)) {
return "Happy Hanukkah!";
} else if ((year) == 2028 && month == 11 && (day > 12 && day < 20)) {
return "Happy Hanukkah!";
} else if ((year) == 2029 && month == 11 && (day > 1 && day < 9)) {
return "Happy Hanukkah!";
} else if ((year) == 2030 && month == 11 && (day > 20 && day < 23)) {
return "Happy Hanukkah!";
} else {
return "Today is " + dayNames[week] + " , " + monthNames[month] + " " + day + " " + year;
}
}