@hebcal/core 5.4.5 → 5.4.7

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.
@@ -5,9 +5,9 @@ import './locale';
5
5
  * Represents one of 54 weekly Torah portions, always on a Saturday
6
6
  */
7
7
  export declare class ParshaEvent extends Event {
8
- private readonly parsha;
9
- private readonly il;
10
- private readonly num;
8
+ readonly parsha: string[];
9
+ readonly il: boolean;
10
+ readonly num: number | number[];
11
11
  /**
12
12
  * @param {HDate} date
13
13
  * @param {string[]} parsha - untranslated name of single or double parsha,
package/dist/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v5.4.5 */
1
+ /*! @hebcal/core v5.4.7 */
2
2
  var hebcal = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -9889,9 +9889,17 @@ class HavdalahEvent extends TimedEvent {
9889
9889
  const shortDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
9890
9890
  const heDayNames = ['רִאשׁוֹן', 'שֵׁנִי', 'שְׁלִישִׁי', 'רְבִיעִי', 'חֲמִישִׁי', 'שִׁישִּׁי', 'שַׁבָּת'];
9891
9891
  const night = 'בַּלַּ֥יְלָה';
9892
- const morning = 'בַּבֹּקֶר';
9893
- const afternoon = 'בַּצׇּהֳרַיִים';
9894
- const evening = 'בָּעֶרֶב';
9892
+ function getHebrewTimeOfDay(hour) {
9893
+ if (hour < 5)
9894
+ return night;
9895
+ else if (hour < 12)
9896
+ return 'בַּבֹּקֶר';
9897
+ else if (hour < 17)
9898
+ return 'בַּצׇּהֳרַיִים';
9899
+ else if (hour < 21)
9900
+ return 'בָּעֶרֶב';
9901
+ return night;
9902
+ }
9895
9903
  /**
9896
9904
  * Represents a molad, the moment when the new moon is "born"
9897
9905
  */
@@ -9952,6 +9960,7 @@ class Molad {
9952
9960
  * @return {string}
9953
9961
  */
9954
9962
  render(locale, options) {
9963
+ var _a;
9955
9964
  locale = locale !== null && locale !== void 0 ? locale : Locale.getLocaleName();
9956
9965
  if (typeof locale === 'string') {
9957
9966
  locale = locale.toLowerCase();
@@ -9964,11 +9973,10 @@ class Molad {
9964
9973
  const hour = this.getHour();
9965
9974
  const chalakim = this.getChalakim();
9966
9975
  const moladStr = Locale.gettext('Molad', locale);
9967
- const minutesStr = Locale.lookupTranslation('min', locale) || 'minutes';
9976
+ const minutesStr = (_a = Locale.lookupTranslation('min', locale)) !== null && _a !== void 0 ? _a : 'minutes';
9968
9977
  const chalakimStr = Locale.gettext('chalakim', locale);
9969
9978
  if (isHebrewLocale) {
9970
- const ampm = hour < 5 ? night : hour < 12 ? morning :
9971
- hour < 17 ? afternoon : hour < 21 ? evening : night;
9979
+ const ampm = getHebrewTimeOfDay(hour);
9972
9980
  const result = `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` +
9973
9981
  `בְּשָׁעָה ${hour} ${ampm}, ` +
9974
9982
  `ו-${minutes} ${minutesStr} ` +
@@ -11435,7 +11443,7 @@ class DailyLearning {
11435
11443
  }
11436
11444
 
11437
11445
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
11438
- const version = '5.4.5';
11446
+ const version = '5.4.7';
11439
11447
 
11440
11448
  /* eslint-disable max-len */
11441
11449
  /**
@@ -12002,15 +12010,16 @@ function tachanunYear(year, il) {
12002
12010
  if (shushPurim.getDay() === 6) {
12003
12011
  shushPurim = shushPurim.next();
12004
12012
  }
12005
- const empty = [];
12006
- const none = empty.concat(
12013
+ const none = [
12014
+ new HDate(2, months.TISHREI, year), // Rosh Hashana II
12015
+ ].concat(
12007
12016
  // Rosh Chodesh - 1st of every month. Also includes RH day 1 (1 Tishrei)
12008
12017
  range(1, monthsInYear)
12009
12018
  .map((month) => new HDate(1, month, year)),
12010
12019
  // Rosh Chodesh - 30th of months that have one
12011
12020
  range(1, monthsInYear)
12012
12021
  .filter((month) => HDate.daysInMonth(month, year) === 30)
12013
- .map((month) => new HDate(30, month, year)), new HDate(2, months.TISHREI, year), // Rosh Hashana II
12022
+ .map((month) => new HDate(30, month, year)),
12014
12023
  // entire month of Nisan
12015
12024
  range(1, HDate.daysInMonth(months.NISAN, year))
12016
12025
  .map((mday) => new HDate(mday, months.NISAN, year)), new HDate(18, months.IYYAR, year), // Lag BaOmer
@@ -12027,13 +12036,15 @@ function tachanunYear(year, il) {
12027
12036
  .map((mday) => new HDate(mday, months.KISLEV, year)), new HDate(15, months.SHVAT, year), // Tu BiShvat
12028
12037
  new HDate(14, months.ADAR_II, year), // Purim
12029
12038
  shushPurim, leap ? new HDate(14, months.ADAR_I, year) : []);
12030
- const some = empty.concat(
12039
+ const some = [
12040
+ new HDate(14, months.IYYAR, year), // Pesach Sheini
12041
+ ].concat(
12031
12042
  // Until 14 Sivan
12032
12043
  range(1, 13)
12033
12044
  .map((mday) => new HDate(mday, months.SIVAN, year)),
12034
12045
  // Until after Rosh Chodesh Cheshvan
12035
12046
  range(20, 31)
12036
- .map((mday) => new HDate(mday, months.TISHREI, year)), new HDate(14, months.IYYAR, year), // Pesach Sheini
12047
+ .map((mday) => new HDate(mday, months.TISHREI, year)),
12037
12048
  // Yom HaAtzma'ut, which changes based on day of week
12038
12049
  year >= 5708 ? dateYomHaZikaron(year).next() : [],
12039
12050
  // Yom Yerushalayim