12 #include <tdelocale.h>
16 bool Holiday::ParshaP;
18 TQStringList Holiday::holidays;
19 int Holiday::HolidayFlags;
38 Holiday::FindHoliday(
int month,
int day,
int weekday,
int kvia,
39 bool leap_year_p,
bool israel_p,
40 int day_number,
int year)
44 { Sunday = 1, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
48 bool shabbat_p = (weekday == Saturday);
51 if ((month == 12) && !leap_year_p)
62 (
"These are Jewish holidays and mostly do not have translations. They may have different spellings in your language; otherwise, just translate the sound to your characters",
69 holidays << i18n(
"Erev Pesach");
79 holidays << i18n(
"Sh. HaGadol");
85 if (!israel_p || (day == 15) || (day == 21))
87 holidays << i18n(
"Pesach");
98 holidays << i18n(
"Chol Hamoed");
102 if (year > 1948 + 3760)
103 holidays << i18n(
"Yom HaShoah");
106 if ((day > 15) && OmerP)
108 holidays << Sfirah(day - 15);
121 if (year >= 1948 + 3760)
127 holidays << i18n(
"Yom HaAtzmaut");
129 holidays << i18n(
"Yom HaZikaron");
133 holidays << i18n(
"Yom HaAtzmaut");
142 holidays << i18n(
"Yom HaZikaron");
144 holidays << i18n(
"Yom HaAtzmaut");
150 if (year > 1967 + 3760)
151 holidays << i18n(
"Yom Yerushalayim");
154 holidays << i18n(
"Lag BaOmer");
157 if ((day != 18) && OmerP)
159 holidays << Sfirah(day + 15);
172 holidays << Sfirah(day + 44);
177 if (OmerP && !shabbat_p)
178 holidays << Sfirah(49);
179 holidays << i18n(
"Erev Shavuot");
183 if (!israel_p || (day == 6))
184 holidays << i18n(
"Shavuot");
191 if ((!shabbat_p && (day == 17))
192 || ((weekday == 1) && (day == 18)))
193 holidays << i18n(
"Tzom Tammuz");
197 if (shabbat_p && (3 <= day) && (day <= 16))
200 holidays << i18n(
"Sh. Hazon");
202 holidays << i18n(
"Sh. Nahamu");
203 else if ((!shabbat_p && (day == 9))
204 || ((weekday == 1) && (day == 10)))
206 holidays << i18n(
"Tisha B'Av");
210 if ((day >= 20) && (day <= 26) && shabbat_p)
211 holidays << i18n(
"S'lichot");
213 holidays << i18n(
"Erev R.H.");
221 holidays << i18n(
"Rosh Hashana");
225 holidays << i18n(
"Sh. Shuvah");
227 holidays << i18n(
"Tzom Gedalia");
231 holidays << i18n(
"Tzom Gedalia");
238 holidays << i18n(
"Sh. Shuvah");
241 holidays << i18n(
"Erev Y.K.");
244 holidays << i18n(
"Yom Kippur");
247 holidays << i18n(
"Erev Sukkot");
251 if (!israel_p || (day == 15))
253 holidays << i18n(
"Sukkot");
262 holidays << i18n(
"Chol Hamoed");
265 holidays << i18n(
"Hoshana Rabah");
268 holidays << i18n(
"Shmini Atzeret");
272 holidays << i18n(
"Simchat Torah");
281 holidays << i18n(
"Erev Hanukah");
283 holidays << i18n(
"Hanukah");
287 if (day <= (kvia == 0 ? 3 : 2))
289 holidays << i18n(
"Hanukah");
290 else if (((day == 10) && !shabbat_p)
291 || ((day == 11) && (weekday == 1)))
293 holidays << i18n(
"Tzom Tevet");
303 if ((kvia != 0) && shabbat_p)
304 holidays << i18n(
"Sh. Shirah");
312 holidays << i18n(
"Sh. Shirah");
316 holidays << i18n(
"Sh. Shirah");
317 holidays << i18n(
"Tu B'Shvat");
319 if ((kvia == 0) && shabbat_p)
320 holidays << i18n(
"Sh. Shirah");
329 if (shabbat_p && !leap_year_p)
330 holidays << i18n(
"Sh. Shekalim");
338 holidays << i18n(
"Purim Katan");
339 else if ((day >= 25) && shabbat_p)
341 holidays << i18n(
"Sh. Shekalim");
349 holidays << i18n(
"Sh. Shekalim");
355 if (weekday == Thursday)
356 holidays << i18n(
"Ta'anit Ester");
364 holidays << i18n(
"Sh. Zachor");
368 holidays << i18n(
"Sh. Zachor");
370 holidays << i18n(
"Erev Purim");
372 if (weekday < Friday)
373 holidays << i18n(
"Ta'anit Ester");
376 holidays << i18n(
"Purim");
380 holidays << i18n(
"Shushan Purim");
384 holidays << i18n(
"Shushan Purim");
394 holidays << i18n(
"Sh. Parah");
403 holidays << i18n(
"Sh. HaHodesh");
408 if (shabbat_p && ParshaP)
410 holidays << Parsha::FindParshaName(day_number, kvia, leap_year_p,
416 TQString Holiday::Sfirah(
int day)
428 buffer + i18n(
" Omer");