@hebcal/rest-api 5.0.1 → 5.0.3
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 +344 -59
- package/dist/bundle.min.js +2 -2
- package/dist/fullcalendar.js +111 -39
- package/dist/fullcalendar.min.js +2 -2
- package/dist/{index.js → index.cjs} +344 -56
- package/dist/index.mjs +344 -56
- package/package.json +20 -22
package/dist/bundle.js
CHANGED
|
@@ -1,10 +1,277 @@
|
|
|
1
|
-
/*! @hebcal/rest-api v5.0.
|
|
1
|
+
/*! @hebcal/rest-api v5.0.3 */
|
|
2
2
|
var hebcal__rest_api = (function (exports, core, leyning, triennial) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
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"};
|
|
5
|
+
var holidayDescription = {
|
|
6
|
+
"Asara B'Tevet": "Fast commemorating the siege of Jerusalem",
|
|
7
|
+
"Ben-Gurion Day": "Commemorates the life and vision of Israel's first Prime Minister David Ben-Gurion",
|
|
8
|
+
"Birkat Hachamah": "A rare Jewish blessing recited once every 28 years thanking G-d for creating the sun",
|
|
9
|
+
"Chag HaBanot": "North African Chanukah festival of daughters. Called Eid al-Banat in Arabic, the holiday was most preserved in Tunisia",
|
|
10
|
+
"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)",
|
|
11
|
+
"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",
|
|
12
|
+
"Family Day": "Yom HaMishpacha, a day to honor the family unit",
|
|
13
|
+
"Herzl Day": "Commemorates the life and vision of Zionist leader Theodor Herzl",
|
|
14
|
+
"Jabotinsky Day": "Commemorates the life and vision of Zionist leader Ze'ev Jabotinsky",
|
|
15
|
+
"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",
|
|
16
|
+
"Leil Selichot": "Prayers for forgiveness in preparation for the High Holidays",
|
|
17
|
+
"Pesach Sheni": "Second Passover, one month after Passover",
|
|
18
|
+
"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",
|
|
19
|
+
"Purim Katan": "Minor Purim celebration during Adar I on leap years",
|
|
20
|
+
"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",
|
|
21
|
+
"Purim Meshulash": "Triple Purim, spanning 3 days in Jerusalem and walled cities. It occurs when the 15th of Adar coincides with Shabbat",
|
|
22
|
+
"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",
|
|
23
|
+
"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",
|
|
24
|
+
"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",
|
|
25
|
+
"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",
|
|
26
|
+
"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",
|
|
27
|
+
"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",
|
|
28
|
+
"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",
|
|
29
|
+
"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",
|
|
30
|
+
"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",
|
|
31
|
+
"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",
|
|
32
|
+
"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",
|
|
33
|
+
"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",
|
|
34
|
+
"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",
|
|
35
|
+
"Rosh Hashana": "The Jewish New Year. Also spelled Rosh Hashanah",
|
|
36
|
+
"Rosh Hashana LaBehemot": "New Year for Tithing Animals",
|
|
37
|
+
"Shabbat Chazon": "Shabbat of Prophecy/Shabbat of Vision. Shabbat before Tish'a B'Av",
|
|
38
|
+
"Shabbat HaChodesh": "Shabbat before Rosh Chodesh Nissan. Read in preparation for Passover",
|
|
39
|
+
"Shabbat HaGadol": "Shabbat before Pesach (The Great Shabbat)",
|
|
40
|
+
"Shabbat Machar Chodesh": "When Shabbat falls the day before Rosh Chodesh",
|
|
41
|
+
"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\")",
|
|
42
|
+
"Shabbat Parah": "Shabbat of the Red Heifer. Shabbat before Shabbat HaChodesh, in preparation for Passover",
|
|
43
|
+
"Shabbat Rosh Chodesh": "When Shabbat falls on Rosh Chodesh",
|
|
44
|
+
"Shabbat Shekalim": "Shabbat before Rosh Chodesh Adar. Read in preparation for Purim",
|
|
45
|
+
"Shabbat Shirah": "Shabbat of Song. Shabbat that includes Parashat Beshalach",
|
|
46
|
+
"Shabbat Shuva": "Shabbat of Returning. Shabbat that occurs during the Ten Days of Repentance between Rosh Hashanah and Yom Kippur",
|
|
47
|
+
"Shabbat Zachor": "Shabbat of Remembrance. Shabbat before Purim",
|
|
48
|
+
"Shavuot": "Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai",
|
|
49
|
+
"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",
|
|
50
|
+
"Shushan Purim": "Purim celebrated in Jerusalem and walled cities",
|
|
51
|
+
"Shushan Purim Katan": "Minor Purim celebration during Adar I on leap years in Jerusalem and walled cities",
|
|
52
|
+
"Sigd": "Ethiopian Jewish holiday occurring 50 days after Yom Kippur",
|
|
53
|
+
"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",
|
|
54
|
+
"Sukkot": "Feast of Booths. Also called the Feast of Tabernacles, the seven-day holiday is one of the Three Pilgrimage Festivals (Hebrew: שלוש רגלים, shalosh regalim)",
|
|
55
|
+
"Ta'anit Bechorot": "Fast of the First Born",
|
|
56
|
+
"Ta'anit Esther": "Fast of Esther",
|
|
57
|
+
"Tish'a B'Av": "The Ninth of Av. Fast commemorating the destruction of the two Temples",
|
|
58
|
+
"Tu B'Av": "Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av",
|
|
59
|
+
"Tu BiShvat": "New Year for Trees. Tu BiShvat is one of four “New Years” mentioned in the Mishnah",
|
|
60
|
+
"Tzom Gedaliah": "Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah",
|
|
61
|
+
"Tzom Tammuz": "Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple",
|
|
62
|
+
"Yitzhak Rabin Memorial Day": "Commemorates the life of Israeli Prime Minister Yitzhak Rabin",
|
|
63
|
+
"Yom HaAliyah": "Recognizes Aliyah, immigration to the Jewish State of Israel",
|
|
64
|
+
"Yom HaAliyah School Observance": "Aliyah Day observed in Israeli schools",
|
|
65
|
+
"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",
|
|
66
|
+
"Yom HaShoah": "Holocaust Memorial Day",
|
|
67
|
+
"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",
|
|
68
|
+
"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",
|
|
69
|
+
"Yom Kippur Katan": "Minor day of atonement occurring monthly on the day preceeding each Rosh Chodesh",
|
|
70
|
+
"Yom Yerushalayim": "Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"
|
|
71
|
+
};
|
|
6
72
|
|
|
7
|
-
|
|
73
|
+
var countryNames = {
|
|
74
|
+
"AD": "Andorra",
|
|
75
|
+
"AE": "United Arab Emirates",
|
|
76
|
+
"AF": "Afghanistan",
|
|
77
|
+
"AI": "Anguilla",
|
|
78
|
+
"AL": "Albania",
|
|
79
|
+
"AM": "Armenia",
|
|
80
|
+
"AO": "Angola",
|
|
81
|
+
"AR": "Argentina",
|
|
82
|
+
"AS": "American Samoa",
|
|
83
|
+
"AT": "Austria",
|
|
84
|
+
"AU": "Australia",
|
|
85
|
+
"AW": "Aruba",
|
|
86
|
+
"AZ": "Azerbaijan",
|
|
87
|
+
"BA": "Bosnia and Herzegovina",
|
|
88
|
+
"BB": "Barbados",
|
|
89
|
+
"BD": "Bangladesh",
|
|
90
|
+
"BE": "Belgium",
|
|
91
|
+
"BF": "Burkina Faso",
|
|
92
|
+
"BG": "Bulgaria",
|
|
93
|
+
"BH": "Bahrain",
|
|
94
|
+
"BI": "Burundi",
|
|
95
|
+
"BJ": "Benin",
|
|
96
|
+
"BM": "Bermuda",
|
|
97
|
+
"BN": "Brunei",
|
|
98
|
+
"BO": "Bolivia",
|
|
99
|
+
"BR": "Brazil",
|
|
100
|
+
"BS": "Bahamas",
|
|
101
|
+
"BT": "Bhutan",
|
|
102
|
+
"BW": "Botswana",
|
|
103
|
+
"BY": "Belarus",
|
|
104
|
+
"BZ": "Belize",
|
|
105
|
+
"CA": "Canada",
|
|
106
|
+
"CD": "Democratic Republic of the Congo",
|
|
107
|
+
"CF": "Central African Republic",
|
|
108
|
+
"CG": "Republic of the Congo",
|
|
109
|
+
"CH": "Switzerland",
|
|
110
|
+
"CI": "Ivory Coast",
|
|
111
|
+
"CK": "Cook Islands",
|
|
112
|
+
"CL": "Chile",
|
|
113
|
+
"CM": "Cameroon",
|
|
114
|
+
"CN": "China",
|
|
115
|
+
"CO": "Colombia",
|
|
116
|
+
"CR": "Costa Rica",
|
|
117
|
+
"CU": "Cuba",
|
|
118
|
+
"CV": "Cape Verde",
|
|
119
|
+
"CW": "Curacao",
|
|
120
|
+
"CY": "Cyprus",
|
|
121
|
+
"CZ": "Czech Republic",
|
|
122
|
+
"DE": "Germany",
|
|
123
|
+
"DK": "Denmark",
|
|
124
|
+
"DM": "Dominica",
|
|
125
|
+
"DO": "Dominican Republic",
|
|
126
|
+
"DZ": "Algeria",
|
|
127
|
+
"EC": "Ecuador",
|
|
128
|
+
"EE": "Estonia",
|
|
129
|
+
"EG": "Egypt",
|
|
130
|
+
"ER": "Eritrea",
|
|
131
|
+
"ES": "Spain",
|
|
132
|
+
"ET": "Ethiopia",
|
|
133
|
+
"FI": "Finland",
|
|
134
|
+
"FJ": "Fiji",
|
|
135
|
+
"FK": "Falkland Islands",
|
|
136
|
+
"FO": "Faroe Islands",
|
|
137
|
+
"FR": "France",
|
|
138
|
+
"GA": "Gabon",
|
|
139
|
+
"GB": "United Kingdom",
|
|
140
|
+
"GE": "Georgia",
|
|
141
|
+
"GH": "Ghana",
|
|
142
|
+
"GI": "Gibraltar",
|
|
143
|
+
"GL": "Greenland",
|
|
144
|
+
"GM": "Gambia",
|
|
145
|
+
"GN": "Guinea",
|
|
146
|
+
"GQ": "Equatorial Guinea",
|
|
147
|
+
"GR": "Greece",
|
|
148
|
+
"GT": "Guatemala",
|
|
149
|
+
"GW": "Guinea-Bissau",
|
|
150
|
+
"GY": "Guyana",
|
|
151
|
+
"HK": "Hong Kong",
|
|
152
|
+
"HN": "Honduras",
|
|
153
|
+
"HR": "Croatia",
|
|
154
|
+
"HT": "Haiti",
|
|
155
|
+
"HU": "Hungary",
|
|
156
|
+
"ID": "Indonesia",
|
|
157
|
+
"IE": "Ireland",
|
|
158
|
+
"IL": "Israel",
|
|
159
|
+
"IM": "Isle of Man",
|
|
160
|
+
"IN": "India",
|
|
161
|
+
"IQ": "Iraq",
|
|
162
|
+
"IR": "Iran",
|
|
163
|
+
"IS": "Iceland",
|
|
164
|
+
"IT": "Italy",
|
|
165
|
+
"JM": "Jamaica",
|
|
166
|
+
"JO": "Jordan",
|
|
167
|
+
"JP": "Japan",
|
|
168
|
+
"KE": "Kenya",
|
|
169
|
+
"KG": "Kyrgyzstan",
|
|
170
|
+
"KH": "Cambodia",
|
|
171
|
+
"KM": "Comoros",
|
|
172
|
+
"KN": "Saint Kitts and Nevis",
|
|
173
|
+
"KP": "North Korea",
|
|
174
|
+
"KR": "South Korea",
|
|
175
|
+
"KW": "Kuwait",
|
|
176
|
+
"KY": "Cayman Islands",
|
|
177
|
+
"KZ": "Kazakhstan",
|
|
178
|
+
"LA": "Laos",
|
|
179
|
+
"LB": "Lebanon",
|
|
180
|
+
"LC": "Saint Lucia",
|
|
181
|
+
"LI": "Liechtenstein",
|
|
182
|
+
"LR": "Liberia",
|
|
183
|
+
"LS": "Lesotho",
|
|
184
|
+
"LT": "Lithuania",
|
|
185
|
+
"LU": "Luxembourg",
|
|
186
|
+
"LV": "Latvia",
|
|
187
|
+
"LY": "Libya",
|
|
188
|
+
"MA": "Morocco",
|
|
189
|
+
"MD": "Moldova",
|
|
190
|
+
"ME": "Montenegro",
|
|
191
|
+
"MG": "Madagascar",
|
|
192
|
+
"MK": "Macedonia",
|
|
193
|
+
"ML": "Mali",
|
|
194
|
+
"MM": "Myanmar",
|
|
195
|
+
"MN": "Mongolia",
|
|
196
|
+
"MP": "Northern Mariana Islands",
|
|
197
|
+
"MR": "Mauritania",
|
|
198
|
+
"MS": "Montserrat",
|
|
199
|
+
"MT": "Malta",
|
|
200
|
+
"MU": "Mauritius",
|
|
201
|
+
"MW": "Malawi",
|
|
202
|
+
"MX": "Mexico",
|
|
203
|
+
"MY": "Malaysia",
|
|
204
|
+
"MZ": "Mozambique",
|
|
205
|
+
"NA": "Namibia",
|
|
206
|
+
"NC": "New Caledonia",
|
|
207
|
+
"NE": "Niger",
|
|
208
|
+
"NG": "Nigeria",
|
|
209
|
+
"NI": "Nicaragua",
|
|
210
|
+
"NL": "Netherlands",
|
|
211
|
+
"NO": "Norway",
|
|
212
|
+
"NP": "Nepal",
|
|
213
|
+
"NU": "Niue",
|
|
214
|
+
"NZ": "New Zealand",
|
|
215
|
+
"OM": "Oman",
|
|
216
|
+
"PA": "Panama",
|
|
217
|
+
"PE": "Peru",
|
|
218
|
+
"PF": "French Polynesia",
|
|
219
|
+
"PG": "Papua New Guinea",
|
|
220
|
+
"PH": "Philippines",
|
|
221
|
+
"PK": "Pakistan",
|
|
222
|
+
"PL": "Poland",
|
|
223
|
+
"PR": "Puerto Rico",
|
|
224
|
+
"PT": "Portugal",
|
|
225
|
+
"PY": "Paraguay",
|
|
226
|
+
"QA": "Qatar",
|
|
227
|
+
"RO": "Romania",
|
|
228
|
+
"RS": "Serbia",
|
|
229
|
+
"RU": "Russia",
|
|
230
|
+
"RW": "Rwanda",
|
|
231
|
+
"SA": "Saudi Arabia",
|
|
232
|
+
"SB": "Solomon Islands",
|
|
233
|
+
"SC": "Seychelles",
|
|
234
|
+
"SD": "Sudan",
|
|
235
|
+
"SE": "Sweden",
|
|
236
|
+
"SG": "Singapore",
|
|
237
|
+
"SH": "Saint Helena",
|
|
238
|
+
"SI": "Slovenia",
|
|
239
|
+
"SK": "Slovakia",
|
|
240
|
+
"SL": "Sierra Leone",
|
|
241
|
+
"SN": "Senegal",
|
|
242
|
+
"SO": "Somalia",
|
|
243
|
+
"SR": "Suriname",
|
|
244
|
+
"ST": "Sao Tome and Principe",
|
|
245
|
+
"SV": "El Salvador",
|
|
246
|
+
"SY": "Syria",
|
|
247
|
+
"SZ": "Swaziland",
|
|
248
|
+
"TC": "Turks and Caicos Islands",
|
|
249
|
+
"TD": "Chad",
|
|
250
|
+
"TG": "Togo",
|
|
251
|
+
"TH": "Thailand",
|
|
252
|
+
"TJ": "Tajikistan",
|
|
253
|
+
"TM": "Turkmenistan",
|
|
254
|
+
"TN": "Tunisia",
|
|
255
|
+
"TR": "Turkey",
|
|
256
|
+
"TV": "Tuvalu",
|
|
257
|
+
"TW": "Taiwan",
|
|
258
|
+
"TZ": "Tanzania",
|
|
259
|
+
"UA": "Ukraine",
|
|
260
|
+
"UG": "Uganda",
|
|
261
|
+
"US": "United States",
|
|
262
|
+
"UY": "Uruguay",
|
|
263
|
+
"UZ": "Uzbekistan",
|
|
264
|
+
"VC": "Saint Vincent and the Grenadines",
|
|
265
|
+
"VE": "Venezuela",
|
|
266
|
+
"VG": "British Virgin Islands",
|
|
267
|
+
"VN": "Vietnam",
|
|
268
|
+
"WS": "Samoa",
|
|
269
|
+
"YE": "Yemen",
|
|
270
|
+
"YT": "Mayotte",
|
|
271
|
+
"ZA": "South Africa",
|
|
272
|
+
"ZM": "Zambia",
|
|
273
|
+
"ZW": "Zimbabwe"
|
|
274
|
+
};
|
|
8
275
|
|
|
9
276
|
/**
|
|
10
277
|
* Location information
|
|
@@ -41,7 +308,7 @@ function locationToPlainObj(location) {
|
|
|
41
308
|
latitude: location.getLatitude(),
|
|
42
309
|
longitude: location.getLongitude(),
|
|
43
310
|
cc: location.getCountryCode(),
|
|
44
|
-
country: countryNames[location.getCountryCode()]
|
|
311
|
+
country: countryNames[location.getCountryCode()],
|
|
45
312
|
};
|
|
46
313
|
for (const k of LOC_FIELDS) {
|
|
47
314
|
if (location[k]) {
|
|
@@ -50,9 +317,7 @@ function locationToPlainObj(location) {
|
|
|
50
317
|
}
|
|
51
318
|
return o;
|
|
52
319
|
} else {
|
|
53
|
-
return {
|
|
54
|
-
geo: 'none'
|
|
55
|
-
};
|
|
320
|
+
return {geo: 'none'};
|
|
56
321
|
}
|
|
57
322
|
}
|
|
58
323
|
|
|
@@ -65,7 +330,12 @@ function locationToPlainObj(location) {
|
|
|
65
330
|
* @return {string}
|
|
66
331
|
*/
|
|
67
332
|
function makeAnchor(s) {
|
|
68
|
-
return s.toLowerCase()
|
|
333
|
+
return s.toLowerCase()
|
|
334
|
+
.replace(/'/g, '')
|
|
335
|
+
.replace(/[^\w]/g, '-')
|
|
336
|
+
.replace(/-+/g, '-')
|
|
337
|
+
.replace(/^-/g, '')
|
|
338
|
+
.replace(/-$/g, '');
|
|
69
339
|
}
|
|
70
340
|
|
|
71
341
|
/**
|
|
@@ -171,12 +441,12 @@ function renderTitleWithoutTime(ev) {
|
|
|
171
441
|
function getCalendarTitle(events, options) {
|
|
172
442
|
let title = 'Hebcal';
|
|
173
443
|
const location = options.location;
|
|
174
|
-
const locationName = location
|
|
444
|
+
const locationName = location?.getName();
|
|
175
445
|
if (options.yahrzeit) {
|
|
176
446
|
title += ' Yahrzeits and Anniversaries';
|
|
177
447
|
} else if (locationName) {
|
|
178
448
|
const comma = locationName.indexOf(',');
|
|
179
|
-
const name = comma == -1 ? locationName : locationName.substring(0, comma);
|
|
449
|
+
const name = (comma == -1) ? locationName : locationName.substring(0, comma);
|
|
180
450
|
title += ' ' + name;
|
|
181
451
|
} else if (options.il) {
|
|
182
452
|
title += ' Israel';
|
|
@@ -194,9 +464,7 @@ function getCalendarTitle(events, options) {
|
|
|
194
464
|
if (start.getFullYear() != end.getFullYear()) {
|
|
195
465
|
title += ' ' + start.getFullYear() + '-' + end.getFullYear();
|
|
196
466
|
} else if (start.getMonth() == end.getMonth()) {
|
|
197
|
-
const monthFormat = new Intl.DateTimeFormat('en-US', {
|
|
198
|
-
month: 'long'
|
|
199
|
-
});
|
|
467
|
+
const monthFormat = new Intl.DateTimeFormat('en-US', {month: 'long'});
|
|
200
468
|
const startMonth = monthFormat.format(start);
|
|
201
469
|
title += ' ' + startMonth + ' ' + start.getFullYear();
|
|
202
470
|
} else {
|
|
@@ -212,8 +480,7 @@ function getCalendarTitle(events, options) {
|
|
|
212
480
|
* @param {boolean} [firstSentence=false]
|
|
213
481
|
* @return {string}
|
|
214
482
|
*/
|
|
215
|
-
function getHolidayDescription(ev) {
|
|
216
|
-
let firstSentence = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
483
|
+
function getHolidayDescription(ev, firstSentence=false) {
|
|
217
484
|
const str0 = holidayDescription[ev.getDesc()] || holidayDescription[ev.basename()] || '';
|
|
218
485
|
const str = str0.normalize();
|
|
219
486
|
if (firstSentence && str) {
|
|
@@ -224,7 +491,11 @@ function getHolidayDescription(ev) {
|
|
|
224
491
|
}
|
|
225
492
|
return str;
|
|
226
493
|
}
|
|
227
|
-
|
|
494
|
+
|
|
495
|
+
const HOLIDAY_IGNORE_MASK = core.flags.DAF_YOMI | core.flags.OMER_COUNT |
|
|
496
|
+
core.flags.SHABBAT_MEVARCHIM | core.flags.MOLAD | core.flags.USER_EVENT |
|
|
497
|
+
core.flags.NACH_YOMI | core.flags.DAILY_LEARNING |
|
|
498
|
+
core.flags.HEBREW_DATE | core.flags.YERUSHALMI_YOMI;
|
|
228
499
|
|
|
229
500
|
/**
|
|
230
501
|
* Makes mulit-line text that summarizes Torah & Haftarah
|
|
@@ -234,10 +505,12 @@ const HOLIDAY_IGNORE_MASK = core.flags.DAF_YOMI | core.flags.OMER_COUNT | core.f
|
|
|
234
505
|
*/
|
|
235
506
|
function makeTorahMemoText(ev, il) {
|
|
236
507
|
const mask = ev.getFlags();
|
|
237
|
-
if (mask & HOLIDAY_IGNORE_MASK || typeof ev.eventTime !== 'undefined') {
|
|
508
|
+
if ((mask & HOLIDAY_IGNORE_MASK) || (typeof ev.eventTime !== 'undefined')) {
|
|
238
509
|
return '';
|
|
239
510
|
}
|
|
240
|
-
const reading = mask & core.flags.PARSHA_HASHAVUA ?
|
|
511
|
+
const reading = (mask & core.flags.PARSHA_HASHAVUA) ?
|
|
512
|
+
leyning.getLeyningForParshaHaShavua(ev, il) :
|
|
513
|
+
leyning.getLeyningForHoliday(ev, il);
|
|
241
514
|
let memo = '';
|
|
242
515
|
if (reading && (reading.summary || reading.haftara)) {
|
|
243
516
|
if (reading.summary) {
|
|
@@ -247,14 +520,13 @@ function makeTorahMemoText(ev, il) {
|
|
|
247
520
|
memo += '\n';
|
|
248
521
|
}
|
|
249
522
|
if (reading.haftara) {
|
|
250
|
-
var _reading$reason;
|
|
251
523
|
memo += 'Haftarah: ' + reading.haftara;
|
|
252
|
-
if (
|
|
524
|
+
if (reading.reason?.haftara) {
|
|
253
525
|
memo += ' | ' + reading.reason.haftara;
|
|
254
526
|
}
|
|
255
527
|
}
|
|
256
528
|
}
|
|
257
|
-
if (reading
|
|
529
|
+
if (reading?.sephardic) {
|
|
258
530
|
memo += '\nHaftarah for Sephardim: ' + reading.sephardic;
|
|
259
531
|
}
|
|
260
532
|
return memo;
|
|
@@ -306,8 +578,7 @@ function appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign) {
|
|
|
306
578
|
u.pathname = '/h/' + path.substring(10);
|
|
307
579
|
} else if (isSedrot) {
|
|
308
580
|
u.pathname = '/s/' + path.substring(8);
|
|
309
|
-
} else {
|
|
310
|
-
// isOmer
|
|
581
|
+
} else { // isOmer
|
|
311
582
|
u.pathname = '/o/' + path.substring(6);
|
|
312
583
|
}
|
|
313
584
|
if (!utmCampaign || !(utmCampaign.startsWith('ical-') || utmCampaign.startsWith('pdf-'))) {
|
|
@@ -347,8 +618,8 @@ function shouldRenderBrief(ev) {
|
|
|
347
618
|
const mask = ev.getFlags();
|
|
348
619
|
if (mask & core.flags.HEBREW_DATE) {
|
|
349
620
|
const hd = ev.getDate();
|
|
350
|
-
return hd.getDate() === 1 ? false : true;
|
|
351
|
-
} else if (mask & (core.flags.DAF_YOMI | core.flags.YERUSHALMI_YOMI)) {
|
|
621
|
+
return (hd.getDate() === 1) ? false : true;
|
|
622
|
+
} else if (mask & (core.flags.DAILY_LEARNING | core.flags.DAF_YOMI | core.flags.YERUSHALMI_YOMI)) {
|
|
352
623
|
return true;
|
|
353
624
|
} else if (mask & core.flags.MINOR_FAST && ev.getDesc().substring(0, 16) === 'Yom Kippur Katan') {
|
|
354
625
|
return true;
|
|
@@ -361,6 +632,7 @@ function shouldRenderBrief(ev) {
|
|
|
361
632
|
|
|
362
633
|
// eslint-disable-next-line max-len
|
|
363
634
|
const csvHeader = '"Subject","Start Date","Start Time","End Date","End Time","All day event","Description","Show time as","Location"';
|
|
635
|
+
|
|
364
636
|
const CATEGORY = {
|
|
365
637
|
dafyomi: 'Daf Yomi',
|
|
366
638
|
mishnayomi: 'Mishna Yomi',
|
|
@@ -374,7 +646,7 @@ const CATEGORY = {
|
|
|
374
646
|
parashat: 'Torah Reading',
|
|
375
647
|
roshchodesh: 'Jewish Holidays',
|
|
376
648
|
user: 'Personal',
|
|
377
|
-
zmanim: ''
|
|
649
|
+
zmanim: '',
|
|
378
650
|
};
|
|
379
651
|
|
|
380
652
|
/**
|
|
@@ -389,10 +661,12 @@ function eventToCsv(e, options) {
|
|
|
389
661
|
const mon = d.getMonth() + 1;
|
|
390
662
|
const year = String(d.getFullYear()).padStart(4, '0');
|
|
391
663
|
const date = options.euro ? `"${mday}/${mon}/${year}"` : `"${mon}/${mday}/${year}"`;
|
|
664
|
+
|
|
392
665
|
let startTime = '';
|
|
393
666
|
let endTime = '';
|
|
394
667
|
let endDate = '';
|
|
395
668
|
let allDay = '"true"';
|
|
669
|
+
|
|
396
670
|
const timed = Boolean(e.eventTime);
|
|
397
671
|
let subj = shouldRenderBrief(e) ? e.renderBrief(options.locale) : e.render(options.locale);
|
|
398
672
|
if (e.eventTime) {
|
|
@@ -401,31 +675,36 @@ function eventToCsv(e, options) {
|
|
|
401
675
|
endDate = date;
|
|
402
676
|
allDay = '"false"';
|
|
403
677
|
}
|
|
678
|
+
|
|
404
679
|
let loc = 'Jewish Holidays';
|
|
405
680
|
const mask = e.getFlags();
|
|
406
681
|
if (timed && typeof options.location === 'object') {
|
|
407
682
|
const locationName = options.location.getShortName();
|
|
408
683
|
const comma = locationName.indexOf(',');
|
|
409
|
-
loc = comma === -1 ? locationName : locationName.substring(0, comma);
|
|
684
|
+
loc = (comma === -1) ? locationName : locationName.substring(0, comma);
|
|
410
685
|
} else {
|
|
411
686
|
const category = CATEGORY[getEventCategories(e)[0]];
|
|
412
687
|
if (typeof category === 'string') {
|
|
413
688
|
loc = category;
|
|
414
689
|
}
|
|
415
690
|
}
|
|
691
|
+
|
|
416
692
|
subj = subj.replace(/,/g, '').replace(/"/g, '\'\'');
|
|
693
|
+
|
|
417
694
|
if (options.appendHebrewToSubject) {
|
|
418
695
|
const hebrew = e.renderBrief('he');
|
|
419
696
|
if (hebrew) {
|
|
420
697
|
subj += ` / ${hebrew}`;
|
|
421
698
|
}
|
|
422
699
|
}
|
|
700
|
+
|
|
423
701
|
let memo0 = e.memo || getHolidayDescription(e, true);
|
|
424
702
|
if (!memo0 && typeof e.linkedEvent !== 'undefined') {
|
|
425
703
|
memo0 = e.linkedEvent.render(options.locale);
|
|
426
704
|
}
|
|
427
705
|
const memo = memo0.replace(/,/g, ';').replace(/"/g, '\'\'').replace(/\n/g, ' / ');
|
|
428
|
-
|
|
706
|
+
|
|
707
|
+
const showTimeAs = (timed || (mask & core.flags.CHAG)) ? 4 : 3;
|
|
429
708
|
return `"${subj}",${date},${startTime},${endDate},${endTime},${allDay},"${memo}","${showTimeAs}","${loc}"`;
|
|
430
709
|
}
|
|
431
710
|
|
|
@@ -435,7 +714,7 @@ function eventToCsv(e, options) {
|
|
|
435
714
|
* @return {string}
|
|
436
715
|
*/
|
|
437
716
|
function eventsToCsv(events, options) {
|
|
438
|
-
return [csvHeader].concat(events.map(e => eventToCsv(e, options))).join('\r\n') + '\r\n';
|
|
717
|
+
return [csvHeader].concat(events.map((e) => eventToCsv(e, options))).join('\r\n') + '\r\n';
|
|
439
718
|
}
|
|
440
719
|
|
|
441
720
|
/**
|
|
@@ -454,20 +733,19 @@ function eventIsoDate(ev) {
|
|
|
454
733
|
* @param {boolean} [leyning=true]
|
|
455
734
|
* @return {Object}
|
|
456
735
|
*/
|
|
457
|
-
function eventsToClassicApi(events, options) {
|
|
458
|
-
let leyning = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
736
|
+
function eventsToClassicApi(events, options, leyning=true) {
|
|
459
737
|
const result = {
|
|
460
738
|
title: getCalendarTitle(events, options),
|
|
461
|
-
date: new Date().toISOString()
|
|
739
|
+
date: new Date().toISOString(),
|
|
462
740
|
};
|
|
463
741
|
result.location = locationToPlainObj(options.location);
|
|
464
742
|
if (events.length) {
|
|
465
743
|
result.range = {
|
|
466
744
|
start: eventIsoDate(events[0]),
|
|
467
|
-
end: eventIsoDate(events[events.length - 1])
|
|
745
|
+
end: eventIsoDate(events[events.length - 1]),
|
|
468
746
|
};
|
|
469
747
|
}
|
|
470
|
-
result.items = events.map(ev => eventToClassicApiObject(ev, options, leyning));
|
|
748
|
+
result.items = events.map((ev) => eventToClassicApiObject(ev, options, leyning));
|
|
471
749
|
return result;
|
|
472
750
|
}
|
|
473
751
|
|
|
@@ -478,13 +756,14 @@ function eventsToClassicApi(events, options) {
|
|
|
478
756
|
* @param {boolean} [leyning=true]
|
|
479
757
|
* @return {Object}
|
|
480
758
|
*/
|
|
481
|
-
function eventToClassicApiObject(ev, options) {
|
|
482
|
-
let leyning$1 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
759
|
+
function eventToClassicApiObject(ev, options, leyning$1=true) {
|
|
483
760
|
const timed = Boolean(ev.eventTime);
|
|
484
761
|
const hd = ev.getDate();
|
|
485
762
|
const dt = hd.greg();
|
|
486
763
|
const tzid = typeof options.location === 'object' ? options.location.getTzid() : 'UTC';
|
|
487
|
-
const date = timed ?
|
|
764
|
+
const date = timed ?
|
|
765
|
+
core.Zmanim.formatISOWithTimeZone(tzid, ev.eventTime) :
|
|
766
|
+
toISOString(dt);
|
|
488
767
|
const categories = getEventCategories(ev);
|
|
489
768
|
const mask = ev.getFlags();
|
|
490
769
|
let title = shouldRenderBrief(ev) ? ev.renderBrief(options.locale) : ev.render(options.locale);
|
|
@@ -496,7 +775,7 @@ function eventToClassicApiObject(ev, options) {
|
|
|
496
775
|
}
|
|
497
776
|
const result = {
|
|
498
777
|
title: title,
|
|
499
|
-
date: date
|
|
778
|
+
date: date,
|
|
500
779
|
};
|
|
501
780
|
if (!timed) {
|
|
502
781
|
result.hdate = hd.toString();
|
|
@@ -505,7 +784,7 @@ function eventToClassicApiObject(ev, options) {
|
|
|
505
784
|
if (categories.length > 1) {
|
|
506
785
|
result.subcat = categories[1];
|
|
507
786
|
}
|
|
508
|
-
if (categories[0] === 'holiday' && mask & core.flags.CHAG) {
|
|
787
|
+
if (categories[0] === 'holiday' && (mask & core.flags.CHAG)) {
|
|
509
788
|
result.yomtov = true;
|
|
510
789
|
}
|
|
511
790
|
if (title != desc) {
|
|
@@ -518,8 +797,10 @@ function eventToClassicApiObject(ev, options) {
|
|
|
518
797
|
if (!candles) {
|
|
519
798
|
if (leyning$1) {
|
|
520
799
|
const il = options.il;
|
|
521
|
-
const isParsha = mask === core.flags.PARSHA_HASHAVUA;
|
|
522
|
-
const reading = isParsha ?
|
|
800
|
+
const isParsha = (mask === core.flags.PARSHA_HASHAVUA);
|
|
801
|
+
const reading = isParsha ?
|
|
802
|
+
leyning.getLeyningForParshaHaShavua(ev, il) :
|
|
803
|
+
leyning.getLeyningForHoliday(ev, il);
|
|
523
804
|
if (reading) {
|
|
524
805
|
result.leyning = formatLeyningResult(reading);
|
|
525
806
|
const hyear = hd.getFullYear();
|
|
@@ -536,20 +817,21 @@ function eventToClassicApiObject(ev, options) {
|
|
|
536
817
|
const utmSource = options.utmSource || 'js';
|
|
537
818
|
const utmMedium = options.utmMedium || 'api';
|
|
538
819
|
const utmCampaign = options.utmCampaign;
|
|
539
|
-
result.link = appendIsraelAndTracking(url, options.il,
|
|
820
|
+
result.link = appendIsraelAndTracking(url, options.il,
|
|
821
|
+
utmSource, utmMedium, utmCampaign);
|
|
540
822
|
}
|
|
541
823
|
}
|
|
542
824
|
if (mask & core.flags.OMER_COUNT) {
|
|
543
825
|
result.omer = {
|
|
544
826
|
count: {
|
|
545
827
|
he: ev.getTodayIs('he'),
|
|
546
|
-
en: ev.getTodayIs('en')
|
|
828
|
+
en: ev.getTodayIs('en'),
|
|
547
829
|
},
|
|
548
830
|
sefira: {
|
|
549
831
|
he: ev.sefira('he'),
|
|
550
832
|
translit: ev.sefira('translit'),
|
|
551
|
-
en: ev.sefira('en')
|
|
552
|
-
}
|
|
833
|
+
en: ev.sefira('en'),
|
|
834
|
+
},
|
|
553
835
|
};
|
|
554
836
|
}
|
|
555
837
|
if (mask & core.flags.MOLAD) {
|
|
@@ -560,18 +842,18 @@ function eventToClassicApiObject(ev, options) {
|
|
|
560
842
|
dow: m.dow,
|
|
561
843
|
hour: m.hour,
|
|
562
844
|
minutes: m.minutes,
|
|
563
|
-
chalakim: m.chalakim
|
|
845
|
+
chalakim: m.chalakim,
|
|
564
846
|
};
|
|
565
847
|
delete result.hebrew;
|
|
566
848
|
}
|
|
567
|
-
if (options.heDateParts && !timed || mask & core.flags.HEBREW_DATE) {
|
|
849
|
+
if ((options.heDateParts && !timed) || (mask & core.flags.HEBREW_DATE)) {
|
|
568
850
|
const yy = hd.getFullYear();
|
|
569
851
|
const mm = hd.getMonthName();
|
|
570
852
|
const dd = hd.getDate();
|
|
571
853
|
result.heDateParts = {
|
|
572
854
|
y: core.gematriya(yy),
|
|
573
855
|
m: core.Locale.gettext(mm, 'he-x-NoNikud'),
|
|
574
|
-
d: core.gematriya(dd)
|
|
856
|
+
d: core.gematriya(dd),
|
|
575
857
|
};
|
|
576
858
|
}
|
|
577
859
|
const memo = ev.memo || holidayDescription[ev.basename()];
|
|
@@ -664,13 +946,14 @@ function getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium) {
|
|
|
664
946
|
}
|
|
665
947
|
return [link, guid];
|
|
666
948
|
}
|
|
949
|
+
|
|
667
950
|
const localeToLg = {
|
|
668
951
|
's': 'en',
|
|
669
952
|
'a': 'en',
|
|
670
953
|
'he-x-NoNikud': 'he',
|
|
671
954
|
'h': 'he',
|
|
672
955
|
'ah': 'en',
|
|
673
|
-
'sh': 'en'
|
|
956
|
+
'sh': 'en',
|
|
674
957
|
};
|
|
675
958
|
|
|
676
959
|
/**
|
|
@@ -683,7 +966,7 @@ function eventsToRss2(events, options) {
|
|
|
683
966
|
weekday: 'long',
|
|
684
967
|
day: '2-digit',
|
|
685
968
|
month: 'long',
|
|
686
|
-
year: 'numeric'
|
|
969
|
+
year: 'numeric',
|
|
687
970
|
});
|
|
688
971
|
const location = options.location;
|
|
689
972
|
const mainUrl = options.mainUrl;
|
|
@@ -694,7 +977,9 @@ function eventsToRss2(events, options) {
|
|
|
694
977
|
const description = options.description || title;
|
|
695
978
|
const utmSource = options.utmSource || 'shabbat1c';
|
|
696
979
|
const utmMedium = options.utmMedium || 'rss';
|
|
697
|
-
const mainUrlEsc = appendIsraelAndTracking(mainUrl,
|
|
980
|
+
const mainUrlEsc = appendIsraelAndTracking(mainUrl,
|
|
981
|
+
location?.getIsrael(),
|
|
982
|
+
utmSource, utmMedium, options.utmCampaign).replace(/&/g, '&');
|
|
698
983
|
const selfUrlEsc = options.selfUrl.replace(/&/g, '&');
|
|
699
984
|
const lang = options.lang || localeToLg[options.locale] || options.locale || 'en-US';
|
|
700
985
|
let str = `<?xml version="1.0" encoding="UTF-8"?>
|
|
@@ -759,11 +1044,7 @@ function eventToRssItem2(ev, options) {
|
|
|
759
1044
|
if (candles) {
|
|
760
1045
|
const colon = subj.indexOf(': ');
|
|
761
1046
|
if (colon != -1) {
|
|
762
|
-
const options = {
|
|
763
|
-
location,
|
|
764
|
-
il,
|
|
765
|
-
locale: core.Locale.getLocaleName()
|
|
766
|
-
};
|
|
1047
|
+
const options = {location, il, locale: core.Locale.getLocaleName()};
|
|
767
1048
|
const time = core.HebrewCalendar.reformatTimeStr(ev.eventTimeStr, 'pm', options);
|
|
768
1049
|
subj = subj.substring(0, colon) + ': ' + time;
|
|
769
1050
|
}
|
|
@@ -773,7 +1054,9 @@ function eventToRssItem2(ev, options) {
|
|
|
773
1054
|
const dayFormat = options.dayFormat;
|
|
774
1055
|
const description0 = memo || dayFormat.format(evDate);
|
|
775
1056
|
const description = description0.indexOf('<') === -1 ? description0 : `<![CDATA[${description0}]]>`;
|
|
776
|
-
const geoTags = cat0 == 'candles' ?
|
|
1057
|
+
const geoTags = (cat0 == 'candles') ?
|
|
1058
|
+
`<geo:lat>${location.getLatitude()}</geo:lat>\n<geo:long>${location.getLongitude()}</geo:long>\n` :
|
|
1059
|
+
'';
|
|
777
1060
|
return `<item>
|
|
778
1061
|
<title>${subj}</title>
|
|
779
1062
|
<link>${link}</link>
|
|
@@ -800,12 +1083,14 @@ function eventToFullCalendar(ev, tzid, il) {
|
|
|
800
1083
|
}
|
|
801
1084
|
const timed = Boolean(ev.eventTime);
|
|
802
1085
|
const title = shouldRenderBrief(ev) ? ev.renderBrief() : ev.render();
|
|
803
|
-
const start = timed ?
|
|
1086
|
+
const start = timed ?
|
|
1087
|
+
core.Zmanim.formatISOWithTimeZone(tzid, ev.eventTime) :
|
|
1088
|
+
toISOString(ev.getDate().greg());
|
|
804
1089
|
const result = {
|
|
805
1090
|
title,
|
|
806
1091
|
start,
|
|
807
1092
|
allDay: !timed,
|
|
808
|
-
className: classes.join(' ')
|
|
1093
|
+
className: classes.join(' '),
|
|
809
1094
|
};
|
|
810
1095
|
const hebrew = ev.renderBrief('he');
|
|
811
1096
|
if (hebrew) {
|