@hebcal/rest-api 3.16.0 → 3.19.0

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/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- /*! @hebcal/rest-api v3.16.0 */
1
+ /*! @hebcal/rest-api v3.19.0 */
2
2
  import { flags, Zmanim, HebrewCalendar, Locale } from '@hebcal/core';
3
3
  import * as leyn from '@hebcal/leyning';
4
4
 
5
- const Chanukah="Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights";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";var holidayDescription = {"Asara B'Tevet":"Fast commemorating the siege of Jerusalem",Chanukah:Chanukah,"Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Lag BaOmer":"33rd day of counting the Omer","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,"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 before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","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 Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:Shavuot,"Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities",Sigd:Sigd,"Simchat Torah":"Day of Celebrating the Torah",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","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","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","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};
5
+ const Chanukah="Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights";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";var holidayDescription = {"Asara B'Tevet":"Fast commemorating the siege of Jerusalem",Chanukah:Chanukah,"Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Lag BaOmer":"33rd day of counting the Omer","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,"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 before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","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 Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:Shavuot,"Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities",Sigd:Sigd,"Simchat Torah":"Day of Celebrating the Torah",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","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","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","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"};
6
6
 
7
7
  const AD="Andorra";const AE="United Arab Emirates";const AF="Afghanistan";const AI="Anguilla";const AL="Albania";const AM="Armenia";const AO="Angola";const AR="Argentina";const AS="American Samoa";const AT="Austria";const AU="Australia";const AW="Aruba";const AZ="Azerbaijan";const BA="Bosnia and Herzegovina";const BB="Barbados";const BD="Bangladesh";const BE="Belgium";const BF="Burkina Faso";const BG="Bulgaria";const BH="Bahrain";const BI="Burundi";const BJ="Benin";const BM="Bermuda";const BN="Brunei";const BO="Bolivia";const BR="Brazil";const BS="Bahamas";const BT="Bhutan";const BW="Botswana";const BY="Belarus";const BZ="Belize";const CA="Canada";const CD="Democratic Republic of the Congo";const CF="Central African Republic";const CG="Republic of the Congo";const CH="Switzerland";const CI="Ivory Coast";const CK="Cook Islands";const CL="Chile";const CM="Cameroon";const CN="China";const CO="Colombia";const CR="Costa Rica";const CU="Cuba";const CV="Cape Verde";const CW="Curacao";const CY="Cyprus";const CZ="Czech Republic";const DE="Germany";const DK="Denmark";const DM="Dominica";const DO="Dominican Republic";const DZ="Algeria";const EC="Ecuador";const EE="Estonia";const EG="Egypt";const ER="Eritrea";const ES="Spain";const ET="Ethiopia";const FI="Finland";const FJ="Fiji";const FK="Falkland Islands";const FO="Faroe Islands";const FR="France";const GA="Gabon";const GB="United Kingdom";const GE="Georgia";const GH="Ghana";const GI="Gibraltar";const GL="Greenland";const GM="Gambia";const GN="Guinea";const GQ="Equatorial Guinea";const GR="Greece";const GT="Guatemala";const GW="Guinea-Bissau";const GY="Guyana";const HK="Hong Kong";const HN="Honduras";const HR="Croatia";const HT="Haiti";const HU="Hungary";const ID="Indonesia";const IE="Ireland";const IL="Israel";const IM="Isle of Man";const IN="India";const IQ="Iraq";const IR="Iran";const IS="Iceland";const IT="Italy";const JM="Jamaica";const JO="Jordan";const JP="Japan";const KE="Kenya";const KG="Kyrgyzstan";const KH="Cambodia";const KM="Comoros";const KN="Saint Kitts and Nevis";const KP="North Korea";const KR="South Korea";const KW="Kuwait";const KY="Cayman Islands";const KZ="Kazakhstan";const LA="Laos";const LB="Lebanon";const LC="Saint Lucia";const LI="Liechtenstein";const LR="Liberia";const LS="Lesotho";const LT="Lithuania";const LU="Luxembourg";const LV="Latvia";const LY="Libya";const MA="Morocco";const MD="Moldova";const ME="Montenegro";const MG="Madagascar";const MK="Macedonia";const ML="Mali";const MM="Myanmar";const MN="Mongolia";const MP="Northern Mariana Islands";const MR="Mauritania";const MS="Montserrat";const MT="Malta";const MU="Mauritius";const MW="Malawi";const MX="Mexico";const MY="Malaysia";const MZ="Mozambique";const NA="Namibia";const NC="New Caledonia";const NE="Niger";const NG="Nigeria";const NI="Nicaragua";const NL="Netherlands";const NO="Norway";const NP="Nepal";const NU="Niue";const NZ="New Zealand";const OM="Oman";const PA="Panama";const PE="Peru";const PF="French Polynesia";const PG="Papua New Guinea";const PH="Philippines";const PK="Pakistan";const PL="Poland";const PR="Puerto Rico";const PT="Portugal";const PY="Paraguay";const QA="Qatar";const RO="Romania";const RS="Serbia";const RU="Russia";const RW="Rwanda";const SA="Saudi Arabia";const SB="Solomon Islands";const SC="Seychelles";const SD="Sudan";const SE="Sweden";const SG="Singapore";const SH="Saint Helena";const SI="Slovenia";const SK="Slovakia";const SL="Sierra Leone";const SN="Senegal";const SO="Somalia";const SR="Suriname";const ST="Sao Tome and Principe";const SV="El Salvador";const SY="Syria";const SZ="Swaziland";const TC="Turks and Caicos Islands";const TD="Chad";const TG="Togo";const TH="Thailand";const TJ="Tajikistan";const TM="Turkmenistan";const TN="Tunisia";const TR="Turkey";const TV="Tuvalu";const TW="Taiwan";const TZ="Tanzania";const UA="Ukraine";const UG="Uganda";const US="United States";const UY="Uruguay";const UZ="Uzbekistan";const VC="Saint Vincent and the Grenadines";const VE="Venezuela";const VG="British Virgin Islands";const VN="Vietnam";const WS="Samoa";const YE="Yemen";const YT="Mayotte";const ZA="South Africa";const ZM="Zambia";const ZW="Zimbabwe";var countryNames = {AD:AD,AE:AE,AF:AF,AI:AI,AL:AL,AM:AM,AO:AO,AR:AR,AS:AS,AT:AT,AU:AU,AW:AW,AZ:AZ,BA:BA,BB:BB,BD:BD,BE:BE,BF:BF,BG:BG,BH:BH,BI:BI,BJ:BJ,BM:BM,BN:BN,BO:BO,BR:BR,BS:BS,BT:BT,BW:BW,BY:BY,BZ:BZ,CA:CA,CD:CD,CF:CF,CG:CG,CH:CH,CI:CI,CK:CK,CL:CL,CM:CM,CN:CN,CO:CO,CR:CR,CU:CU,CV:CV,CW:CW,CY:CY,CZ:CZ,DE:DE,DK:DK,DM:DM,DO:DO,DZ:DZ,EC:EC,EE:EE,EG:EG,ER:ER,ES:ES,ET:ET,FI:FI,FJ:FJ,FK:FK,FO:FO,FR:FR,GA:GA,GB:GB,GE:GE,GH:GH,GI:GI,GL:GL,GM:GM,GN:GN,GQ:GQ,GR:GR,GT:GT,GW:GW,GY:GY,HK:HK,HN:HN,HR:HR,HT:HT,HU:HU,ID:ID,IE:IE,IL:IL,IM:IM,IN:IN,IQ:IQ,IR:IR,IS:IS,IT:IT,JM:JM,JO:JO,JP:JP,KE:KE,KG:KG,KH:KH,KM:KM,KN:KN,KP:KP,KR:KR,KW:KW,KY:KY,KZ:KZ,LA:LA,LB:LB,LC:LC,LI:LI,LR:LR,LS:LS,LT:LT,LU:LU,LV:LV,LY:LY,MA:MA,MD:MD,ME:ME,MG:MG,MK:MK,ML:ML,MM:MM,MN:MN,MP:MP,MR:MR,MS:MS,MT:MT,MU:MU,MW:MW,MX:MX,MY:MY,MZ:MZ,NA:NA,NC:NC,NE:NE,NG:NG,NI:NI,NL:NL,NO:NO,NP:NP,NU:NU,NZ:NZ,OM:OM,PA:PA,PE:PE,PF:PF,PG:PG,PH:PH,PK:PK,PL:PL,PR:PR,PT:PT,PY:PY,QA:QA,RO:RO,RS:RS,RU:RU,RW:RW,SA:SA,SB:SB,SC:SC,SD:SD,SE:SE,SG:SG,SH:SH,SI:SI,SK:SK,SL:SL,SN:SN,SO:SO,SR:SR,ST:ST,SV:SV,SY:SY,SZ:SZ,TC:TC,TD:TD,TG:TG,TH:TH,TJ:TJ,TM:TM,TN:TN,TR:TR,TV:TV,TW:TW,TZ:TZ,UA:UA,UG:UG,US:US,UY:UY,UZ:UZ,VC:VC,VE:VE,VG:VG,VN:VN,WS:WS,YE:YE,YT:YT,ZA:ZA,ZM:ZM,ZW:ZW};
8
8
 
@@ -257,9 +257,9 @@ function getCalendarTitle(events, options) {
257
257
  return title;
258
258
  }
259
259
 
260
- if (options.isHebrewYear || events.length == 0) {
260
+ if (options.year && (options.isHebrewYear || events.length == 0)) {
261
261
  title += ' ' + options.year;
262
- } else {
262
+ } else if (events.length) {
263
263
  const start = events[0].getDate().greg();
264
264
  const end = events[events.length - 1].getDate().greg();
265
265
 
@@ -521,6 +521,15 @@ function eventsToCsv(events, options) {
521
521
  return [csvHeader].concat(events.map(e => eventToCsv(e, options))).join('\r\n') + '\r\n';
522
522
  }
523
523
 
524
+ /**
525
+ * @private
526
+ * @param {Event} ev
527
+ * @return {string}
528
+ */
529
+
530
+ function eventIsoDate(ev) {
531
+ return toISOString(ev.getDate().greg());
532
+ }
524
533
  /**
525
534
  * Formats a list events for the classic Hebcal.com JSON API response
526
535
  * @param {Event[]} events
@@ -529,12 +538,21 @@ function eventsToCsv(events, options) {
529
538
  * @return {Object}
530
539
  */
531
540
 
541
+
532
542
  function eventsToClassicApi(events, options, leyning = true) {
533
543
  const result = {
534
544
  title: getCalendarTitle(events, options),
535
545
  date: new Date().toISOString()
536
546
  };
537
547
  result.location = locationToPlainObj(options.location);
548
+
549
+ if (events.length) {
550
+ result.range = {
551
+ start: eventIsoDate(events[0]),
552
+ end: eventIsoDate(events[events.length - 1])
553
+ };
554
+ }
555
+
538
556
  result.items = events.map(ev => eventToClassicApiObject(ev, options, leyning));
539
557
  return result;
540
558
  }
@@ -644,6 +662,10 @@ function eventToClassicApiObject(ev, options, leyning = true) {
644
662
  result.memo = ev.linkedEvent.render(options.locale);
645
663
  }
646
664
 
665
+ if (options.includeEvent) {
666
+ result.ev = ev;
667
+ }
668
+
647
669
  return result;
648
670
  }
649
671
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/rest-api",
3
- "version": "3.16.0",
3
+ "version": "3.19.0",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal"
@@ -21,7 +21,7 @@
21
21
  "url": "https://github.com/hebcal/hebcal-rest-api/issues"
22
22
  },
23
23
  "dependencies": {
24
- "@hebcal/core": "^3.37.2",
24
+ "@hebcal/core": "^3.41.0",
25
25
  "@hebcal/leyning": "^4.13.3"
26
26
  },
27
27
  "scripts": {
@@ -43,20 +43,20 @@
43
43
  "verbose": true
44
44
  },
45
45
  "devDependencies": {
46
- "@babel/core": "^7.17.10",
47
- "@babel/preset-env": "^7.17.10",
46
+ "@babel/core": "^7.18.5",
47
+ "@babel/preset-env": "^7.18.2",
48
48
  "@babel/register": "^7.17.7",
49
49
  "@rollup/plugin-babel": "^5.3.1",
50
- "@rollup/plugin-commonjs": "^22.0.0",
50
+ "@rollup/plugin-commonjs": "^22.0.1",
51
51
  "@rollup/plugin-json": "^4.1.0",
52
52
  "@rollup/plugin-node-resolve": "^13.3.0",
53
- "ava": "^4.2.0",
54
- "core-js": "^3.22.5",
55
- "eslint": "^8.15.0",
53
+ "ava": "^4.3.0",
54
+ "core-js": "^3.23.2",
55
+ "eslint": "^8.18.0",
56
56
  "eslint-config-google": "^0.14.0",
57
57
  "jsdoc": "^3.6.10",
58
58
  "jsdoc-to-markdown": "^7.1.1",
59
- "rollup": "^2.72.1",
59
+ "rollup": "^2.75.7",
60
60
  "rollup-plugin-terser": "^7.0.2"
61
61
  }
62
62
  }