@hebcal/rest-api 5.0.0 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +353 -67
- package/dist/bundle.min.js +2 -2
- package/dist/fullcalendar.js +110 -38
- package/dist/fullcalendar.min.js +2 -2
- package/dist/{index.js → index.cjs} +353 -64
- package/dist/index.mjs +353 -64
- package/package.json +19 -21
|
@@ -1,13 +1,280 @@
|
|
|
1
|
-
/*! @hebcal/rest-api v5.0.
|
|
1
|
+
/*! @hebcal/rest-api v5.0.2 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var core = require('@hebcal/core');
|
|
5
5
|
var leyning = require('@hebcal/leyning');
|
|
6
6
|
var triennial = require('@hebcal/triennial');
|
|
7
7
|
|
|
8
|
-
const Chanukah="Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights, the eight-day festival is observed by lighting the candles of a hanukkiah (menorah)";const Pesach="Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt";const Purim="Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination";const Shavuot="Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai";const Sigd="Ethiopian Jewish holiday occurring 50 days after Yom Kippur";const Sukkot="Feast of Booths. Also called the Feast of Tabernacles, the seven-day holiday is one of the Three Pilgrimage Festivals (Hebrew: שלוש רגלים, shalosh regalim)";var holidayDescription = {"Asara B'Tevet":"Fast commemorating the siege of Jerusalem","Ben-Gurion Day":"Commemorates the life and vision of Israel's first Prime Minister David Ben-Gurion","Birkat Hachamah":"A rare Jewish blessing recited once every 28 years thanking G-d for creating the sun","Chag HaBanot":"North African Chanukah festival of daughters. Called Eid al-Banat in Arabic, the holiday was most preserved in Tunisia",Chanukah:Chanukah,"Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot. Also called Sefirat HaOmer, it is a practice that consists of a verbal counting of each of the forty-nine days between the two holidays","Family Day":"Yom HaMishpacha, a day to honor the family unit","Herzl Day":"Commemorates the life and vision of Zionist leader Theodor Herzl","Jabotinsky Day":"Commemorates the life and vision of Zionist leader Ze'ev Jabotinsky","Lag BaOmer":"33rd day of counting the Omer. The holiday is a temporary break from the semi-mourning period the counting of the Omer. Practices include lighting bonfires, getting haircuts, and Jewish weddings","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:Pesach,"Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:Purim,"Purim Meshulash":"Triple Purim, spanning 3 days in Jerusalem and walled cities. It occurs when the 15th of Adar coincides with Shabbat","Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":"Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes \"Adar Bet\" or \"Adar Sheni\", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Rosh Hashana LaBehemot":"New Year for Tithing Animals","Shabbat Chazon":"Shabbat of Prophecy/Shabbat of Vision. Shabbat before Tish'a B'Av","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan. Read in preparation for Passover","Shabbat HaGadol":"Shabbat before Pesach (The Great Shabbat)","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer. Shabbat before Shabbat HaChodesh, in preparation for Passover","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar. Read in preparation for Purim","Shabbat Shirah":"Shabbat of Song. Shabbat that includes Parashat Beshalach","Shabbat Shuva":"Shabbat of Returning. Shabbat that occurs during the Ten Days of Repentance between Rosh Hashanah and Yom Kippur","Shabbat Zachor":"Shabbat of Remembrance. Shabbat before Purim",Shavuot:Shavuot,"Shmini Atzeret":"Eighth Day of Assembly. Immediately following Sukkot, it is observed as a separate holiday in the Diaspora and is combined with Simchat Torah in Israel","Shushan Purim":"Purim celebrated in Jerusalem and walled cities","Shushan Purim Katan":"Minor Purim celebration during Adar I on leap years in Jerusalem and walled cities",Sigd:Sigd,"Simchat Torah":"Day of Celebrating the Torah. Celebration marking the conclusion of the annual cycle of public Torah readings, and the beginning of a new cycle",Sukkot:Sukkot,"Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees. Tu BiShvat is one of four “New Years” mentioned in the Mishnah","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yitzhak Rabin Memorial Day":"Commemorates the life of Israeli Prime Minister Yitzhak Rabin","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAliyah School Observance":"Aliyah Day observed in Israeli schools","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Remembers those who died in the War of Independence and other wars in Israel. The full name of the holiday is Yom HaZikaron LeHalalei Ma'arakhot Yisrael ul'Nifge'ei Pe'ulot HaEivah (Hebrew: יוֹם הזִּכָּרוֹן לְחַלְלֵי מַעֲרָכוֹת יִשְׂרָאֵל וּלְנִפְגְעֵי פְּעֻלּוֹת הָאֵיבָה), Memorial Day for the Fallen Soldiers of the Wars of Israel and Victims of Actions of Terrorism. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement. The holiest day of the year in Judaism, traditionally observed with a 25-hour period of fasting and intensive prayer","Yom Kippur Katan":"Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};
|
|
8
|
+
var holidayDescription = {
|
|
9
|
+
"Asara B'Tevet": "Fast commemorating the siege of Jerusalem",
|
|
10
|
+
"Ben-Gurion Day": "Commemorates the life and vision of Israel's first Prime Minister David Ben-Gurion",
|
|
11
|
+
"Birkat Hachamah": "A rare Jewish blessing recited once every 28 years thanking G-d for creating the sun",
|
|
12
|
+
"Chag HaBanot": "North African Chanukah festival of daughters. Called Eid al-Banat in Arabic, the holiday was most preserved in Tunisia",
|
|
13
|
+
"Chanukah": "Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights, the eight-day festival is observed by lighting the candles of a hanukkiah (menorah)",
|
|
14
|
+
"Days of the Omer": "7 weeks from the second night of Pesach to the day before Shavuot. Also called Sefirat HaOmer, it is a practice that consists of a verbal counting of each of the forty-nine days between the two holidays",
|
|
15
|
+
"Family Day": "Yom HaMishpacha, a day to honor the family unit",
|
|
16
|
+
"Herzl Day": "Commemorates the life and vision of Zionist leader Theodor Herzl",
|
|
17
|
+
"Jabotinsky Day": "Commemorates the life and vision of Zionist leader Ze'ev Jabotinsky",
|
|
18
|
+
"Lag BaOmer": "33rd day of counting the Omer. The holiday is a temporary break from the semi-mourning period the counting of the Omer. Practices include lighting bonfires, getting haircuts, and Jewish weddings",
|
|
19
|
+
"Leil Selichot": "Prayers for forgiveness in preparation for the High Holidays",
|
|
20
|
+
"Pesach Sheni": "Second Passover, one month after Passover",
|
|
21
|
+
"Pesach": "Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt",
|
|
22
|
+
"Purim Katan": "Minor Purim celebration during Adar I on leap years",
|
|
23
|
+
"Purim": "Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination",
|
|
24
|
+
"Purim Meshulash": "Triple Purim, spanning 3 days in Jerusalem and walled cities. It occurs when the 15th of Adar coincides with Shabbat",
|
|
25
|
+
"Rosh Chodesh Nisan": "Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
26
|
+
"Rosh Chodesh Iyyar": "Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
27
|
+
"Rosh Chodesh Sivan": "Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
28
|
+
"Rosh Chodesh Tamuz": "Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
29
|
+
"Rosh Chodesh Av": "Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
30
|
+
"Rosh Chodesh Elul": "Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
31
|
+
"Rosh Chodesh Cheshvan": "Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
32
|
+
"Rosh Chodesh Kislev": "Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
33
|
+
"Rosh Chodesh Tevet": "Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
34
|
+
"Rosh Chodesh Sh'vat": "Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
35
|
+
"Rosh Chodesh Adar": "Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
36
|
+
"Rosh Chodesh Adar I": "Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
37
|
+
"Rosh Chodesh Adar II": "Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes \"Adar Bet\" or \"Adar Sheni\", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon",
|
|
38
|
+
"Rosh Hashana": "The Jewish New Year. Also spelled Rosh Hashanah",
|
|
39
|
+
"Rosh Hashana LaBehemot": "New Year for Tithing Animals",
|
|
40
|
+
"Shabbat Chazon": "Shabbat of Prophecy/Shabbat of Vision. Shabbat before Tish'a B'Av",
|
|
41
|
+
"Shabbat HaChodesh": "Shabbat before Rosh Chodesh Nissan. Read in preparation for Passover",
|
|
42
|
+
"Shabbat HaGadol": "Shabbat before Pesach (The Great Shabbat)",
|
|
43
|
+
"Shabbat Machar Chodesh": "When Shabbat falls the day before Rosh Chodesh",
|
|
44
|
+
"Shabbat Nachamu": "Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")",
|
|
45
|
+
"Shabbat Parah": "Shabbat of the Red Heifer. Shabbat before Shabbat HaChodesh, in preparation for Passover",
|
|
46
|
+
"Shabbat Rosh Chodesh": "When Shabbat falls on Rosh Chodesh",
|
|
47
|
+
"Shabbat Shekalim": "Shabbat before Rosh Chodesh Adar. Read in preparation for Purim",
|
|
48
|
+
"Shabbat Shirah": "Shabbat of Song. Shabbat that includes Parashat Beshalach",
|
|
49
|
+
"Shabbat Shuva": "Shabbat of Returning. Shabbat that occurs during the Ten Days of Repentance between Rosh Hashanah and Yom Kippur",
|
|
50
|
+
"Shabbat Zachor": "Shabbat of Remembrance. Shabbat before Purim",
|
|
51
|
+
"Shavuot": "Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai",
|
|
52
|
+
"Shmini Atzeret": "Eighth Day of Assembly. Immediately following Sukkot, it is observed as a separate holiday in the Diaspora and is combined with Simchat Torah in Israel",
|
|
53
|
+
"Shushan Purim": "Purim celebrated in Jerusalem and walled cities",
|
|
54
|
+
"Shushan Purim Katan": "Minor Purim celebration during Adar I on leap years in Jerusalem and walled cities",
|
|
55
|
+
"Sigd": "Ethiopian Jewish holiday occurring 50 days after Yom Kippur",
|
|
56
|
+
"Simchat Torah": "Day of Celebrating the Torah. Celebration marking the conclusion of the annual cycle of public Torah readings, and the beginning of a new cycle",
|
|
57
|
+
"Sukkot": "Feast of Booths. Also called the Feast of Tabernacles, the seven-day holiday is one of the Three Pilgrimage Festivals (Hebrew: שלוש רגלים, shalosh regalim)",
|
|
58
|
+
"Ta'anit Bechorot": "Fast of the First Born",
|
|
59
|
+
"Ta'anit Esther": "Fast of Esther",
|
|
60
|
+
"Tish'a B'Av": "The Ninth of Av. Fast commemorating the destruction of the two Temples",
|
|
61
|
+
"Tu B'Av": "Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av",
|
|
62
|
+
"Tu BiShvat": "New Year for Trees. Tu BiShvat is one of four “New Years” mentioned in the Mishnah",
|
|
63
|
+
"Tzom Gedaliah": "Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah",
|
|
64
|
+
"Tzom Tammuz": "Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple",
|
|
65
|
+
"Yitzhak Rabin Memorial Day": "Commemorates the life of Israeli Prime Minister Yitzhak Rabin",
|
|
66
|
+
"Yom HaAliyah": "Recognizes Aliyah, immigration to the Jewish State of Israel",
|
|
67
|
+
"Yom HaAliyah School Observance": "Aliyah Day observed in Israeli schools",
|
|
68
|
+
"Yom HaAtzma'ut": "Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat",
|
|
69
|
+
"Yom HaShoah": "Holocaust Memorial Day",
|
|
70
|
+
"Yom HaZikaron": "Israeli Memorial Day. Remembers those who died in the War of Independence and other wars in Israel. The full name of the holiday is Yom HaZikaron LeHalalei Ma'arakhot Yisrael ul'Nifge'ei Pe'ulot HaEivah (Hebrew: יוֹם הזִּכָּרוֹן לְחַלְלֵי מַעֲרָכוֹת יִשְׂרָאֵל וּלְנִפְגְעֵי פְּעֻלּוֹת הָאֵיבָה), Memorial Day for the Fallen Soldiers of the Wars of Israel and Victims of Actions of Terrorism. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat",
|
|
71
|
+
"Yom Kippur": "Day of Atonement. The holiest day of the year in Judaism, traditionally observed with a 25-hour period of fasting and intensive prayer",
|
|
72
|
+
"Yom Kippur Katan": "Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh",
|
|
73
|
+
"Yom Yerushalayim": "Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"
|
|
74
|
+
};
|
|
9
75
|
|
|
10
|
-
|
|
76
|
+
var countryNames = {
|
|
77
|
+
"AD": "Andorra",
|
|
78
|
+
"AE": "United Arab Emirates",
|
|
79
|
+
"AF": "Afghanistan",
|
|
80
|
+
"AI": "Anguilla",
|
|
81
|
+
"AL": "Albania",
|
|
82
|
+
"AM": "Armenia",
|
|
83
|
+
"AO": "Angola",
|
|
84
|
+
"AR": "Argentina",
|
|
85
|
+
"AS": "American Samoa",
|
|
86
|
+
"AT": "Austria",
|
|
87
|
+
"AU": "Australia",
|
|
88
|
+
"AW": "Aruba",
|
|
89
|
+
"AZ": "Azerbaijan",
|
|
90
|
+
"BA": "Bosnia and Herzegovina",
|
|
91
|
+
"BB": "Barbados",
|
|
92
|
+
"BD": "Bangladesh",
|
|
93
|
+
"BE": "Belgium",
|
|
94
|
+
"BF": "Burkina Faso",
|
|
95
|
+
"BG": "Bulgaria",
|
|
96
|
+
"BH": "Bahrain",
|
|
97
|
+
"BI": "Burundi",
|
|
98
|
+
"BJ": "Benin",
|
|
99
|
+
"BM": "Bermuda",
|
|
100
|
+
"BN": "Brunei",
|
|
101
|
+
"BO": "Bolivia",
|
|
102
|
+
"BR": "Brazil",
|
|
103
|
+
"BS": "Bahamas",
|
|
104
|
+
"BT": "Bhutan",
|
|
105
|
+
"BW": "Botswana",
|
|
106
|
+
"BY": "Belarus",
|
|
107
|
+
"BZ": "Belize",
|
|
108
|
+
"CA": "Canada",
|
|
109
|
+
"CD": "Democratic Republic of the Congo",
|
|
110
|
+
"CF": "Central African Republic",
|
|
111
|
+
"CG": "Republic of the Congo",
|
|
112
|
+
"CH": "Switzerland",
|
|
113
|
+
"CI": "Ivory Coast",
|
|
114
|
+
"CK": "Cook Islands",
|
|
115
|
+
"CL": "Chile",
|
|
116
|
+
"CM": "Cameroon",
|
|
117
|
+
"CN": "China",
|
|
118
|
+
"CO": "Colombia",
|
|
119
|
+
"CR": "Costa Rica",
|
|
120
|
+
"CU": "Cuba",
|
|
121
|
+
"CV": "Cape Verde",
|
|
122
|
+
"CW": "Curacao",
|
|
123
|
+
"CY": "Cyprus",
|
|
124
|
+
"CZ": "Czech Republic",
|
|
125
|
+
"DE": "Germany",
|
|
126
|
+
"DK": "Denmark",
|
|
127
|
+
"DM": "Dominica",
|
|
128
|
+
"DO": "Dominican Republic",
|
|
129
|
+
"DZ": "Algeria",
|
|
130
|
+
"EC": "Ecuador",
|
|
131
|
+
"EE": "Estonia",
|
|
132
|
+
"EG": "Egypt",
|
|
133
|
+
"ER": "Eritrea",
|
|
134
|
+
"ES": "Spain",
|
|
135
|
+
"ET": "Ethiopia",
|
|
136
|
+
"FI": "Finland",
|
|
137
|
+
"FJ": "Fiji",
|
|
138
|
+
"FK": "Falkland Islands",
|
|
139
|
+
"FO": "Faroe Islands",
|
|
140
|
+
"FR": "France",
|
|
141
|
+
"GA": "Gabon",
|
|
142
|
+
"GB": "United Kingdom",
|
|
143
|
+
"GE": "Georgia",
|
|
144
|
+
"GH": "Ghana",
|
|
145
|
+
"GI": "Gibraltar",
|
|
146
|
+
"GL": "Greenland",
|
|
147
|
+
"GM": "Gambia",
|
|
148
|
+
"GN": "Guinea",
|
|
149
|
+
"GQ": "Equatorial Guinea",
|
|
150
|
+
"GR": "Greece",
|
|
151
|
+
"GT": "Guatemala",
|
|
152
|
+
"GW": "Guinea-Bissau",
|
|
153
|
+
"GY": "Guyana",
|
|
154
|
+
"HK": "Hong Kong",
|
|
155
|
+
"HN": "Honduras",
|
|
156
|
+
"HR": "Croatia",
|
|
157
|
+
"HT": "Haiti",
|
|
158
|
+
"HU": "Hungary",
|
|
159
|
+
"ID": "Indonesia",
|
|
160
|
+
"IE": "Ireland",
|
|
161
|
+
"IL": "Israel",
|
|
162
|
+
"IM": "Isle of Man",
|
|
163
|
+
"IN": "India",
|
|
164
|
+
"IQ": "Iraq",
|
|
165
|
+
"IR": "Iran",
|
|
166
|
+
"IS": "Iceland",
|
|
167
|
+
"IT": "Italy",
|
|
168
|
+
"JM": "Jamaica",
|
|
169
|
+
"JO": "Jordan",
|
|
170
|
+
"JP": "Japan",
|
|
171
|
+
"KE": "Kenya",
|
|
172
|
+
"KG": "Kyrgyzstan",
|
|
173
|
+
"KH": "Cambodia",
|
|
174
|
+
"KM": "Comoros",
|
|
175
|
+
"KN": "Saint Kitts and Nevis",
|
|
176
|
+
"KP": "North Korea",
|
|
177
|
+
"KR": "South Korea",
|
|
178
|
+
"KW": "Kuwait",
|
|
179
|
+
"KY": "Cayman Islands",
|
|
180
|
+
"KZ": "Kazakhstan",
|
|
181
|
+
"LA": "Laos",
|
|
182
|
+
"LB": "Lebanon",
|
|
183
|
+
"LC": "Saint Lucia",
|
|
184
|
+
"LI": "Liechtenstein",
|
|
185
|
+
"LR": "Liberia",
|
|
186
|
+
"LS": "Lesotho",
|
|
187
|
+
"LT": "Lithuania",
|
|
188
|
+
"LU": "Luxembourg",
|
|
189
|
+
"LV": "Latvia",
|
|
190
|
+
"LY": "Libya",
|
|
191
|
+
"MA": "Morocco",
|
|
192
|
+
"MD": "Moldova",
|
|
193
|
+
"ME": "Montenegro",
|
|
194
|
+
"MG": "Madagascar",
|
|
195
|
+
"MK": "Macedonia",
|
|
196
|
+
"ML": "Mali",
|
|
197
|
+
"MM": "Myanmar",
|
|
198
|
+
"MN": "Mongolia",
|
|
199
|
+
"MP": "Northern Mariana Islands",
|
|
200
|
+
"MR": "Mauritania",
|
|
201
|
+
"MS": "Montserrat",
|
|
202
|
+
"MT": "Malta",
|
|
203
|
+
"MU": "Mauritius",
|
|
204
|
+
"MW": "Malawi",
|
|
205
|
+
"MX": "Mexico",
|
|
206
|
+
"MY": "Malaysia",
|
|
207
|
+
"MZ": "Mozambique",
|
|
208
|
+
"NA": "Namibia",
|
|
209
|
+
"NC": "New Caledonia",
|
|
210
|
+
"NE": "Niger",
|
|
211
|
+
"NG": "Nigeria",
|
|
212
|
+
"NI": "Nicaragua",
|
|
213
|
+
"NL": "Netherlands",
|
|
214
|
+
"NO": "Norway",
|
|
215
|
+
"NP": "Nepal",
|
|
216
|
+
"NU": "Niue",
|
|
217
|
+
"NZ": "New Zealand",
|
|
218
|
+
"OM": "Oman",
|
|
219
|
+
"PA": "Panama",
|
|
220
|
+
"PE": "Peru",
|
|
221
|
+
"PF": "French Polynesia",
|
|
222
|
+
"PG": "Papua New Guinea",
|
|
223
|
+
"PH": "Philippines",
|
|
224
|
+
"PK": "Pakistan",
|
|
225
|
+
"PL": "Poland",
|
|
226
|
+
"PR": "Puerto Rico",
|
|
227
|
+
"PT": "Portugal",
|
|
228
|
+
"PY": "Paraguay",
|
|
229
|
+
"QA": "Qatar",
|
|
230
|
+
"RO": "Romania",
|
|
231
|
+
"RS": "Serbia",
|
|
232
|
+
"RU": "Russia",
|
|
233
|
+
"RW": "Rwanda",
|
|
234
|
+
"SA": "Saudi Arabia",
|
|
235
|
+
"SB": "Solomon Islands",
|
|
236
|
+
"SC": "Seychelles",
|
|
237
|
+
"SD": "Sudan",
|
|
238
|
+
"SE": "Sweden",
|
|
239
|
+
"SG": "Singapore",
|
|
240
|
+
"SH": "Saint Helena",
|
|
241
|
+
"SI": "Slovenia",
|
|
242
|
+
"SK": "Slovakia",
|
|
243
|
+
"SL": "Sierra Leone",
|
|
244
|
+
"SN": "Senegal",
|
|
245
|
+
"SO": "Somalia",
|
|
246
|
+
"SR": "Suriname",
|
|
247
|
+
"ST": "Sao Tome and Principe",
|
|
248
|
+
"SV": "El Salvador",
|
|
249
|
+
"SY": "Syria",
|
|
250
|
+
"SZ": "Swaziland",
|
|
251
|
+
"TC": "Turks and Caicos Islands",
|
|
252
|
+
"TD": "Chad",
|
|
253
|
+
"TG": "Togo",
|
|
254
|
+
"TH": "Thailand",
|
|
255
|
+
"TJ": "Tajikistan",
|
|
256
|
+
"TM": "Turkmenistan",
|
|
257
|
+
"TN": "Tunisia",
|
|
258
|
+
"TR": "Turkey",
|
|
259
|
+
"TV": "Tuvalu",
|
|
260
|
+
"TW": "Taiwan",
|
|
261
|
+
"TZ": "Tanzania",
|
|
262
|
+
"UA": "Ukraine",
|
|
263
|
+
"UG": "Uganda",
|
|
264
|
+
"US": "United States",
|
|
265
|
+
"UY": "Uruguay",
|
|
266
|
+
"UZ": "Uzbekistan",
|
|
267
|
+
"VC": "Saint Vincent and the Grenadines",
|
|
268
|
+
"VE": "Venezuela",
|
|
269
|
+
"VG": "British Virgin Islands",
|
|
270
|
+
"VN": "Vietnam",
|
|
271
|
+
"WS": "Samoa",
|
|
272
|
+
"YE": "Yemen",
|
|
273
|
+
"YT": "Mayotte",
|
|
274
|
+
"ZA": "South Africa",
|
|
275
|
+
"ZM": "Zambia",
|
|
276
|
+
"ZW": "Zimbabwe"
|
|
277
|
+
};
|
|
11
278
|
|
|
12
279
|
/**
|
|
13
280
|
* Location information
|
|
@@ -28,6 +295,8 @@ const AD="Andorra";const AE="United Arab Emirates";const AF="Afghanistan";const
|
|
|
28
295
|
* @property {number} geonameid
|
|
29
296
|
*/
|
|
30
297
|
|
|
298
|
+
const LOC_FIELDS = ['elevation', 'admin1', 'asciiname', 'geo', 'zip', 'state', 'stateName', 'geonameid'];
|
|
299
|
+
|
|
31
300
|
/**
|
|
32
301
|
* Converts a @hebcal/core `Location` to a plain JS object.
|
|
33
302
|
* @param {Location} location
|
|
@@ -42,18 +311,16 @@ function locationToPlainObj(location) {
|
|
|
42
311
|
latitude: location.getLatitude(),
|
|
43
312
|
longitude: location.getLongitude(),
|
|
44
313
|
cc: location.getCountryCode(),
|
|
45
|
-
country: countryNames[location.getCountryCode()]
|
|
314
|
+
country: countryNames[location.getCountryCode()],
|
|
46
315
|
};
|
|
47
|
-
|
|
316
|
+
for (const k of LOC_FIELDS) {
|
|
48
317
|
if (location[k]) {
|
|
49
318
|
o[k] = location[k];
|
|
50
319
|
}
|
|
51
|
-
}
|
|
320
|
+
}
|
|
52
321
|
return o;
|
|
53
322
|
} else {
|
|
54
|
-
return {
|
|
55
|
-
geo: 'none'
|
|
56
|
-
};
|
|
323
|
+
return {geo: 'none'};
|
|
57
324
|
}
|
|
58
325
|
}
|
|
59
326
|
|
|
@@ -66,7 +333,12 @@ function locationToPlainObj(location) {
|
|
|
66
333
|
* @return {string}
|
|
67
334
|
*/
|
|
68
335
|
function makeAnchor(s) {
|
|
69
|
-
return s.toLowerCase()
|
|
336
|
+
return s.toLowerCase()
|
|
337
|
+
.replace(/'/g, '')
|
|
338
|
+
.replace(/[^\w]/g, '-')
|
|
339
|
+
.replace(/-+/g, '-')
|
|
340
|
+
.replace(/^-/g, '')
|
|
341
|
+
.replace(/-$/g, '');
|
|
70
342
|
}
|
|
71
343
|
|
|
72
344
|
/**
|
|
@@ -172,12 +444,12 @@ function renderTitleWithoutTime(ev) {
|
|
|
172
444
|
function getCalendarTitle(events, options) {
|
|
173
445
|
let title = 'Hebcal';
|
|
174
446
|
const location = options.location;
|
|
175
|
-
const locationName = location
|
|
447
|
+
const locationName = location?.getName();
|
|
176
448
|
if (options.yahrzeit) {
|
|
177
449
|
title += ' Yahrzeits and Anniversaries';
|
|
178
450
|
} else if (locationName) {
|
|
179
451
|
const comma = locationName.indexOf(',');
|
|
180
|
-
const name = comma == -1 ? locationName : locationName.substring(0, comma);
|
|
452
|
+
const name = (comma == -1) ? locationName : locationName.substring(0, comma);
|
|
181
453
|
title += ' ' + name;
|
|
182
454
|
} else if (options.il) {
|
|
183
455
|
title += ' Israel';
|
|
@@ -195,9 +467,7 @@ function getCalendarTitle(events, options) {
|
|
|
195
467
|
if (start.getFullYear() != end.getFullYear()) {
|
|
196
468
|
title += ' ' + start.getFullYear() + '-' + end.getFullYear();
|
|
197
469
|
} else if (start.getMonth() == end.getMonth()) {
|
|
198
|
-
const monthFormat = new Intl.DateTimeFormat('en-US', {
|
|
199
|
-
month: 'long'
|
|
200
|
-
});
|
|
470
|
+
const monthFormat = new Intl.DateTimeFormat('en-US', {month: 'long'});
|
|
201
471
|
const startMonth = monthFormat.format(start);
|
|
202
472
|
title += ' ' + startMonth + ' ' + start.getFullYear();
|
|
203
473
|
} else {
|
|
@@ -213,7 +483,7 @@ function getCalendarTitle(events, options) {
|
|
|
213
483
|
* @param {boolean} [firstSentence=false]
|
|
214
484
|
* @return {string}
|
|
215
485
|
*/
|
|
216
|
-
function getHolidayDescription(ev, firstSentence
|
|
486
|
+
function getHolidayDescription(ev, firstSentence=false) {
|
|
217
487
|
const str0 = holidayDescription[ev.getDesc()] || holidayDescription[ev.basename()] || '';
|
|
218
488
|
const str = str0.normalize();
|
|
219
489
|
if (firstSentence && str) {
|
|
@@ -224,7 +494,11 @@ function getHolidayDescription(ev, firstSentence = false) {
|
|
|
224
494
|
}
|
|
225
495
|
return str;
|
|
226
496
|
}
|
|
227
|
-
|
|
497
|
+
|
|
498
|
+
const HOLIDAY_IGNORE_MASK = core.flags.DAF_YOMI | core.flags.OMER_COUNT |
|
|
499
|
+
core.flags.SHABBAT_MEVARCHIM | core.flags.MOLAD | core.flags.USER_EVENT |
|
|
500
|
+
core.flags.NACH_YOMI |
|
|
501
|
+
core.flags.HEBREW_DATE | core.flags.YERUSHALMI_YOMI;
|
|
228
502
|
|
|
229
503
|
/**
|
|
230
504
|
* Makes mulit-line text that summarizes Torah & Haftarah
|
|
@@ -234,10 +508,12 @@ const HOLIDAY_IGNORE_MASK = core.flags.DAF_YOMI | core.flags.OMER_COUNT | core.f
|
|
|
234
508
|
*/
|
|
235
509
|
function makeTorahMemoText(ev, il) {
|
|
236
510
|
const mask = ev.getFlags();
|
|
237
|
-
if (mask & HOLIDAY_IGNORE_MASK || typeof ev.eventTime !== 'undefined') {
|
|
511
|
+
if ((mask & HOLIDAY_IGNORE_MASK) || (typeof ev.eventTime !== 'undefined')) {
|
|
238
512
|
return '';
|
|
239
513
|
}
|
|
240
|
-
const reading = mask & core.flags.PARSHA_HASHAVUA ?
|
|
514
|
+
const reading = (mask & core.flags.PARSHA_HASHAVUA) ?
|
|
515
|
+
leyning.getLeyningForParshaHaShavua(ev, il) :
|
|
516
|
+
leyning.getLeyningForHoliday(ev, il);
|
|
241
517
|
let memo = '';
|
|
242
518
|
if (reading && (reading.summary || reading.haftara)) {
|
|
243
519
|
if (reading.summary) {
|
|
@@ -247,14 +523,13 @@ function makeTorahMemoText(ev, il) {
|
|
|
247
523
|
memo += '\n';
|
|
248
524
|
}
|
|
249
525
|
if (reading.haftara) {
|
|
250
|
-
var _reading$reason;
|
|
251
526
|
memo += 'Haftarah: ' + reading.haftara;
|
|
252
|
-
if (
|
|
527
|
+
if (reading.reason?.haftara) {
|
|
253
528
|
memo += ' | ' + reading.reason.haftara;
|
|
254
529
|
}
|
|
255
530
|
}
|
|
256
531
|
}
|
|
257
|
-
if (reading
|
|
532
|
+
if (reading?.sephardic) {
|
|
258
533
|
memo += '\nHaftarah for Sephardim: ' + reading.sephardic;
|
|
259
534
|
}
|
|
260
535
|
return memo;
|
|
@@ -306,8 +581,7 @@ function appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign) {
|
|
|
306
581
|
u.pathname = '/h/' + path.substring(10);
|
|
307
582
|
} else if (isSedrot) {
|
|
308
583
|
u.pathname = '/s/' + path.substring(8);
|
|
309
|
-
} else {
|
|
310
|
-
// isOmer
|
|
584
|
+
} else { // isOmer
|
|
311
585
|
u.pathname = '/o/' + path.substring(6);
|
|
312
586
|
}
|
|
313
587
|
if (!utmCampaign || !(utmCampaign.startsWith('ical-') || utmCampaign.startsWith('pdf-'))) {
|
|
@@ -347,7 +621,7 @@ function shouldRenderBrief(ev) {
|
|
|
347
621
|
const mask = ev.getFlags();
|
|
348
622
|
if (mask & core.flags.HEBREW_DATE) {
|
|
349
623
|
const hd = ev.getDate();
|
|
350
|
-
return hd.getDate() === 1 ? false : true;
|
|
624
|
+
return (hd.getDate() === 1) ? false : true;
|
|
351
625
|
} else if (mask & (core.flags.DAF_YOMI | core.flags.YERUSHALMI_YOMI)) {
|
|
352
626
|
return true;
|
|
353
627
|
} else if (mask & core.flags.MINOR_FAST && ev.getDesc().substring(0, 16) === 'Yom Kippur Katan') {
|
|
@@ -361,6 +635,7 @@ function shouldRenderBrief(ev) {
|
|
|
361
635
|
|
|
362
636
|
// eslint-disable-next-line max-len
|
|
363
637
|
const csvHeader = '"Subject","Start Date","Start Time","End Date","End Time","All day event","Description","Show time as","Location"';
|
|
638
|
+
|
|
364
639
|
const CATEGORY = {
|
|
365
640
|
dafyomi: 'Daf Yomi',
|
|
366
641
|
mishnayomi: 'Mishna Yomi',
|
|
@@ -374,7 +649,7 @@ const CATEGORY = {
|
|
|
374
649
|
parashat: 'Torah Reading',
|
|
375
650
|
roshchodesh: 'Jewish Holidays',
|
|
376
651
|
user: 'Personal',
|
|
377
|
-
zmanim: ''
|
|
652
|
+
zmanim: '',
|
|
378
653
|
};
|
|
379
654
|
|
|
380
655
|
/**
|
|
@@ -389,10 +664,12 @@ function eventToCsv(e, options) {
|
|
|
389
664
|
const mon = d.getMonth() + 1;
|
|
390
665
|
const year = String(d.getFullYear()).padStart(4, '0');
|
|
391
666
|
const date = options.euro ? `"${mday}/${mon}/${year}"` : `"${mon}/${mday}/${year}"`;
|
|
667
|
+
|
|
392
668
|
let startTime = '';
|
|
393
669
|
let endTime = '';
|
|
394
670
|
let endDate = '';
|
|
395
671
|
let allDay = '"true"';
|
|
672
|
+
|
|
396
673
|
const timed = Boolean(e.eventTime);
|
|
397
674
|
let subj = shouldRenderBrief(e) ? e.renderBrief(options.locale) : e.render(options.locale);
|
|
398
675
|
if (e.eventTime) {
|
|
@@ -401,31 +678,36 @@ function eventToCsv(e, options) {
|
|
|
401
678
|
endDate = date;
|
|
402
679
|
allDay = '"false"';
|
|
403
680
|
}
|
|
681
|
+
|
|
404
682
|
let loc = 'Jewish Holidays';
|
|
405
683
|
const mask = e.getFlags();
|
|
406
684
|
if (timed && typeof options.location === 'object') {
|
|
407
685
|
const locationName = options.location.getShortName();
|
|
408
686
|
const comma = locationName.indexOf(',');
|
|
409
|
-
loc = comma === -1 ? locationName : locationName.substring(0, comma);
|
|
687
|
+
loc = (comma === -1) ? locationName : locationName.substring(0, comma);
|
|
410
688
|
} else {
|
|
411
689
|
const category = CATEGORY[getEventCategories(e)[0]];
|
|
412
690
|
if (typeof category === 'string') {
|
|
413
691
|
loc = category;
|
|
414
692
|
}
|
|
415
693
|
}
|
|
694
|
+
|
|
416
695
|
subj = subj.replace(/,/g, '').replace(/"/g, '\'\'');
|
|
696
|
+
|
|
417
697
|
if (options.appendHebrewToSubject) {
|
|
418
698
|
const hebrew = e.renderBrief('he');
|
|
419
699
|
if (hebrew) {
|
|
420
700
|
subj += ` / ${hebrew}`;
|
|
421
701
|
}
|
|
422
702
|
}
|
|
703
|
+
|
|
423
704
|
let memo0 = e.memo || getHolidayDescription(e, true);
|
|
424
705
|
if (!memo0 && typeof e.linkedEvent !== 'undefined') {
|
|
425
706
|
memo0 = e.linkedEvent.render(options.locale);
|
|
426
707
|
}
|
|
427
708
|
const memo = memo0.replace(/,/g, ';').replace(/"/g, '\'\'').replace(/\n/g, ' / ');
|
|
428
|
-
|
|
709
|
+
|
|
710
|
+
const showTimeAs = (timed || (mask & core.flags.CHAG)) ? 4 : 3;
|
|
429
711
|
return `"${subj}",${date},${startTime},${endDate},${endTime},${allDay},"${memo}","${showTimeAs}","${loc}"`;
|
|
430
712
|
}
|
|
431
713
|
|
|
@@ -435,7 +717,7 @@ function eventToCsv(e, options) {
|
|
|
435
717
|
* @return {string}
|
|
436
718
|
*/
|
|
437
719
|
function eventsToCsv(events, options) {
|
|
438
|
-
return [csvHeader].concat(events.map(e => eventToCsv(e, options))).join('\r\n') + '\r\n';
|
|
720
|
+
return [csvHeader].concat(events.map((e) => eventToCsv(e, options))).join('\r\n') + '\r\n';
|
|
439
721
|
}
|
|
440
722
|
|
|
441
723
|
/**
|
|
@@ -454,19 +736,19 @@ function eventIsoDate(ev) {
|
|
|
454
736
|
* @param {boolean} [leyning=true]
|
|
455
737
|
* @return {Object}
|
|
456
738
|
*/
|
|
457
|
-
function eventsToClassicApi(events, options, leyning
|
|
739
|
+
function eventsToClassicApi(events, options, leyning=true) {
|
|
458
740
|
const result = {
|
|
459
741
|
title: getCalendarTitle(events, options),
|
|
460
|
-
date: new Date().toISOString()
|
|
742
|
+
date: new Date().toISOString(),
|
|
461
743
|
};
|
|
462
744
|
result.location = locationToPlainObj(options.location);
|
|
463
745
|
if (events.length) {
|
|
464
746
|
result.range = {
|
|
465
747
|
start: eventIsoDate(events[0]),
|
|
466
|
-
end: eventIsoDate(events[events.length - 1])
|
|
748
|
+
end: eventIsoDate(events[events.length - 1]),
|
|
467
749
|
};
|
|
468
750
|
}
|
|
469
|
-
result.items = events.map(ev => eventToClassicApiObject(ev, options, leyning));
|
|
751
|
+
result.items = events.map((ev) => eventToClassicApiObject(ev, options, leyning));
|
|
470
752
|
return result;
|
|
471
753
|
}
|
|
472
754
|
|
|
@@ -477,12 +759,14 @@ function eventsToClassicApi(events, options, leyning = true) {
|
|
|
477
759
|
* @param {boolean} [leyning=true]
|
|
478
760
|
* @return {Object}
|
|
479
761
|
*/
|
|
480
|
-
function eventToClassicApiObject(ev, options, leyning$1
|
|
762
|
+
function eventToClassicApiObject(ev, options, leyning$1=true) {
|
|
481
763
|
const timed = Boolean(ev.eventTime);
|
|
482
764
|
const hd = ev.getDate();
|
|
483
765
|
const dt = hd.greg();
|
|
484
766
|
const tzid = typeof options.location === 'object' ? options.location.getTzid() : 'UTC';
|
|
485
|
-
const date = timed ?
|
|
767
|
+
const date = timed ?
|
|
768
|
+
core.Zmanim.formatISOWithTimeZone(tzid, ev.eventTime) :
|
|
769
|
+
toISOString(dt);
|
|
486
770
|
const categories = getEventCategories(ev);
|
|
487
771
|
const mask = ev.getFlags();
|
|
488
772
|
let title = shouldRenderBrief(ev) ? ev.renderBrief(options.locale) : ev.render(options.locale);
|
|
@@ -494,7 +778,7 @@ function eventToClassicApiObject(ev, options, leyning$1 = true) {
|
|
|
494
778
|
}
|
|
495
779
|
const result = {
|
|
496
780
|
title: title,
|
|
497
|
-
date: date
|
|
781
|
+
date: date,
|
|
498
782
|
};
|
|
499
783
|
if (!timed) {
|
|
500
784
|
result.hdate = hd.toString();
|
|
@@ -503,7 +787,7 @@ function eventToClassicApiObject(ev, options, leyning$1 = true) {
|
|
|
503
787
|
if (categories.length > 1) {
|
|
504
788
|
result.subcat = categories[1];
|
|
505
789
|
}
|
|
506
|
-
if (categories[0] === 'holiday' && mask & core.flags.CHAG) {
|
|
790
|
+
if (categories[0] === 'holiday' && (mask & core.flags.CHAG)) {
|
|
507
791
|
result.yomtov = true;
|
|
508
792
|
}
|
|
509
793
|
if (title != desc) {
|
|
@@ -516,8 +800,10 @@ function eventToClassicApiObject(ev, options, leyning$1 = true) {
|
|
|
516
800
|
if (!candles) {
|
|
517
801
|
if (leyning$1) {
|
|
518
802
|
const il = options.il;
|
|
519
|
-
const isParsha = mask === core.flags.PARSHA_HASHAVUA;
|
|
520
|
-
const reading = isParsha ?
|
|
803
|
+
const isParsha = (mask === core.flags.PARSHA_HASHAVUA);
|
|
804
|
+
const reading = isParsha ?
|
|
805
|
+
leyning.getLeyningForParshaHaShavua(ev, il) :
|
|
806
|
+
leyning.getLeyningForHoliday(ev, il);
|
|
521
807
|
if (reading) {
|
|
522
808
|
result.leyning = formatLeyningResult(reading);
|
|
523
809
|
const hyear = hd.getFullYear();
|
|
@@ -534,20 +820,21 @@ function eventToClassicApiObject(ev, options, leyning$1 = true) {
|
|
|
534
820
|
const utmSource = options.utmSource || 'js';
|
|
535
821
|
const utmMedium = options.utmMedium || 'api';
|
|
536
822
|
const utmCampaign = options.utmCampaign;
|
|
537
|
-
result.link = appendIsraelAndTracking(url, options.il,
|
|
823
|
+
result.link = appendIsraelAndTracking(url, options.il,
|
|
824
|
+
utmSource, utmMedium, utmCampaign);
|
|
538
825
|
}
|
|
539
826
|
}
|
|
540
827
|
if (mask & core.flags.OMER_COUNT) {
|
|
541
828
|
result.omer = {
|
|
542
829
|
count: {
|
|
543
830
|
he: ev.getTodayIs('he'),
|
|
544
|
-
en: ev.getTodayIs('en')
|
|
831
|
+
en: ev.getTodayIs('en'),
|
|
545
832
|
},
|
|
546
833
|
sefira: {
|
|
547
834
|
he: ev.sefira('he'),
|
|
548
835
|
translit: ev.sefira('translit'),
|
|
549
|
-
en: ev.sefira('en')
|
|
550
|
-
}
|
|
836
|
+
en: ev.sefira('en'),
|
|
837
|
+
},
|
|
551
838
|
};
|
|
552
839
|
}
|
|
553
840
|
if (mask & core.flags.MOLAD) {
|
|
@@ -558,18 +845,18 @@ function eventToClassicApiObject(ev, options, leyning$1 = true) {
|
|
|
558
845
|
dow: m.dow,
|
|
559
846
|
hour: m.hour,
|
|
560
847
|
minutes: m.minutes,
|
|
561
|
-
chalakim: m.chalakim
|
|
848
|
+
chalakim: m.chalakim,
|
|
562
849
|
};
|
|
563
850
|
delete result.hebrew;
|
|
564
851
|
}
|
|
565
|
-
if (options.heDateParts && !timed || mask & core.flags.HEBREW_DATE) {
|
|
852
|
+
if ((options.heDateParts && !timed) || (mask & core.flags.HEBREW_DATE)) {
|
|
566
853
|
const yy = hd.getFullYear();
|
|
567
854
|
const mm = hd.getMonthName();
|
|
568
855
|
const dd = hd.getDate();
|
|
569
856
|
result.heDateParts = {
|
|
570
857
|
y: core.gematriya(yy),
|
|
571
858
|
m: core.Locale.gettext(mm, 'he-x-NoNikud'),
|
|
572
|
-
d: core.gematriya(dd)
|
|
859
|
+
d: core.gematriya(dd),
|
|
573
860
|
};
|
|
574
861
|
}
|
|
575
862
|
const memo = ev.memo || holidayDescription[ev.basename()];
|
|
@@ -590,13 +877,12 @@ function eventToClassicApiObject(ev, options, leyning$1 = true) {
|
|
|
590
877
|
* @return {Object}
|
|
591
878
|
*/
|
|
592
879
|
function formatAliyot(result, aliyot) {
|
|
593
|
-
Object.
|
|
594
|
-
const aliyah = aliyot[num];
|
|
880
|
+
for (const [num, aliyah] of Object.entries(aliyot)) {
|
|
595
881
|
if (typeof aliyah !== 'undefined') {
|
|
596
882
|
const k = num == 'M' ? 'maftir' : num;
|
|
597
883
|
result[k] = leyning.formatAliyahWithBook(aliyah);
|
|
598
884
|
}
|
|
599
|
-
}
|
|
885
|
+
}
|
|
600
886
|
return result;
|
|
601
887
|
}
|
|
602
888
|
|
|
@@ -619,12 +905,12 @@ function formatLeyningResult(reading) {
|
|
|
619
905
|
formatAliyot(result, reading.fullkriyah);
|
|
620
906
|
}
|
|
621
907
|
if (reading.reason) {
|
|
622
|
-
['7', '8', 'M']
|
|
908
|
+
for (const num of ['7', '8', 'M']) {
|
|
623
909
|
if (reading.reason[num]) {
|
|
624
910
|
const k = num == 'M' ? 'maftir' : num;
|
|
625
911
|
result[k] += ' | ' + reading.reason[num];
|
|
626
912
|
}
|
|
627
|
-
}
|
|
913
|
+
}
|
|
628
914
|
if (reading.reason.haftara) {
|
|
629
915
|
result.haftarah += ' | ' + reading.reason.haftara;
|
|
630
916
|
}
|
|
@@ -663,13 +949,14 @@ function getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium) {
|
|
|
663
949
|
}
|
|
664
950
|
return [link, guid];
|
|
665
951
|
}
|
|
952
|
+
|
|
666
953
|
const localeToLg = {
|
|
667
954
|
's': 'en',
|
|
668
955
|
'a': 'en',
|
|
669
956
|
'he-x-NoNikud': 'he',
|
|
670
957
|
'h': 'he',
|
|
671
958
|
'ah': 'en',
|
|
672
|
-
'sh': 'en'
|
|
959
|
+
'sh': 'en',
|
|
673
960
|
};
|
|
674
961
|
|
|
675
962
|
/**
|
|
@@ -682,7 +969,7 @@ function eventsToRss2(events, options) {
|
|
|
682
969
|
weekday: 'long',
|
|
683
970
|
day: '2-digit',
|
|
684
971
|
month: 'long',
|
|
685
|
-
year: 'numeric'
|
|
972
|
+
year: 'numeric',
|
|
686
973
|
});
|
|
687
974
|
const location = options.location;
|
|
688
975
|
const mainUrl = options.mainUrl;
|
|
@@ -693,7 +980,9 @@ function eventsToRss2(events, options) {
|
|
|
693
980
|
const description = options.description || title;
|
|
694
981
|
const utmSource = options.utmSource || 'shabbat1c';
|
|
695
982
|
const utmMedium = options.utmMedium || 'rss';
|
|
696
|
-
const mainUrlEsc = appendIsraelAndTracking(mainUrl,
|
|
983
|
+
const mainUrlEsc = appendIsraelAndTracking(mainUrl,
|
|
984
|
+
location?.getIsrael(),
|
|
985
|
+
utmSource, utmMedium, options.utmCampaign).replace(/&/g, '&');
|
|
697
986
|
const selfUrlEsc = options.selfUrl.replace(/&/g, '&');
|
|
698
987
|
const lang = options.lang || localeToLg[options.locale] || options.locale || 'en-US';
|
|
699
988
|
let str = `<?xml version="1.0" encoding="UTF-8"?>
|
|
@@ -707,9 +996,9 @@ function eventsToRss2(events, options) {
|
|
|
707
996
|
<copyright>Copyright (c) ${thisYear} Michael J. Radwin. All rights reserved.</copyright>
|
|
708
997
|
<lastBuildDate>${lastBuildDate}</lastBuildDate>
|
|
709
998
|
`;
|
|
710
|
-
|
|
999
|
+
for (const ev of events) {
|
|
711
1000
|
str += eventToRssItem2(ev, options);
|
|
712
|
-
}
|
|
1001
|
+
}
|
|
713
1002
|
str += '</channel>\n</rss>\n';
|
|
714
1003
|
return str;
|
|
715
1004
|
}
|
|
@@ -758,11 +1047,7 @@ function eventToRssItem2(ev, options) {
|
|
|
758
1047
|
if (candles) {
|
|
759
1048
|
const colon = subj.indexOf(': ');
|
|
760
1049
|
if (colon != -1) {
|
|
761
|
-
const options = {
|
|
762
|
-
location,
|
|
763
|
-
il,
|
|
764
|
-
locale: core.Locale.getLocaleName()
|
|
765
|
-
};
|
|
1050
|
+
const options = {location, il, locale: core.Locale.getLocaleName()};
|
|
766
1051
|
const time = core.HebrewCalendar.reformatTimeStr(ev.eventTimeStr, 'pm', options);
|
|
767
1052
|
subj = subj.substring(0, colon) + ': ' + time;
|
|
768
1053
|
}
|
|
@@ -772,7 +1057,9 @@ function eventToRssItem2(ev, options) {
|
|
|
772
1057
|
const dayFormat = options.dayFormat;
|
|
773
1058
|
const description0 = memo || dayFormat.format(evDate);
|
|
774
1059
|
const description = description0.indexOf('<') === -1 ? description0 : `<![CDATA[${description0}]]>`;
|
|
775
|
-
const geoTags = cat0 == 'candles' ?
|
|
1060
|
+
const geoTags = (cat0 == 'candles') ?
|
|
1061
|
+
`<geo:lat>${location.getLatitude()}</geo:lat>\n<geo:long>${location.getLongitude()}</geo:long>\n` :
|
|
1062
|
+
'';
|
|
776
1063
|
return `<item>
|
|
777
1064
|
<title>${subj}</title>
|
|
778
1065
|
<link>${link}</link>
|
|
@@ -799,12 +1086,14 @@ function eventToFullCalendar(ev, tzid, il) {
|
|
|
799
1086
|
}
|
|
800
1087
|
const timed = Boolean(ev.eventTime);
|
|
801
1088
|
const title = shouldRenderBrief(ev) ? ev.renderBrief() : ev.render();
|
|
802
|
-
const start = timed ?
|
|
1089
|
+
const start = timed ?
|
|
1090
|
+
core.Zmanim.formatISOWithTimeZone(tzid, ev.eventTime) :
|
|
1091
|
+
toISOString(ev.getDate().greg());
|
|
803
1092
|
const result = {
|
|
804
1093
|
title,
|
|
805
1094
|
start,
|
|
806
1095
|
allDay: !timed,
|
|
807
|
-
className: classes.join(' ')
|
|
1096
|
+
className: classes.join(' '),
|
|
808
1097
|
};
|
|
809
1098
|
const hebrew = ev.renderBrief('he');
|
|
810
1099
|
if (hebrew) {
|