@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.
package/dist/event.d.ts CHANGED
@@ -68,7 +68,7 @@ export declare class Event {
68
68
  readonly mask: number;
69
69
  emoji?: string;
70
70
  memo?: string;
71
- alarm?: Date;
71
+ alarm?: Date | string | boolean;
72
72
  /**
73
73
  * Constructs Event
74
74
  * @param {HDate} date Hebrew date event occurs
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v5.4.5 */
1
+ /*! @hebcal/core v5.4.7 */
2
2
  'use strict';
3
3
 
4
4
  /* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
@@ -8480,9 +8480,17 @@ class HavdalahEvent extends TimedEvent {
8480
8480
  const shortDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
8481
8481
  const heDayNames = ['רִאשׁוֹן', 'שֵׁנִי', 'שְׁלִישִׁי', 'רְבִיעִי', 'חֲמִישִׁי', 'שִׁישִּׁי', 'שַׁבָּת'];
8482
8482
  const night = 'בַּלַּ֥יְלָה';
8483
- const morning = 'בַּבֹּקֶר';
8484
- const afternoon = 'בַּצׇּהֳרַיִים';
8485
- const evening = 'בָּעֶרֶב';
8483
+ function getHebrewTimeOfDay(hour) {
8484
+ if (hour < 5)
8485
+ return night;
8486
+ else if (hour < 12)
8487
+ return 'בַּבֹּקֶר';
8488
+ else if (hour < 17)
8489
+ return 'בַּצׇּהֳרַיִים';
8490
+ else if (hour < 21)
8491
+ return 'בָּעֶרֶב';
8492
+ return night;
8493
+ }
8486
8494
  /**
8487
8495
  * Represents a molad, the moment when the new moon is "born"
8488
8496
  */
@@ -8543,6 +8551,7 @@ class Molad {
8543
8551
  * @return {string}
8544
8552
  */
8545
8553
  render(locale, options) {
8554
+ var _a;
8546
8555
  locale = locale !== null && locale !== void 0 ? locale : Locale.getLocaleName();
8547
8556
  if (typeof locale === 'string') {
8548
8557
  locale = locale.toLowerCase();
@@ -8555,11 +8564,10 @@ class Molad {
8555
8564
  const hour = this.getHour();
8556
8565
  const chalakim = this.getChalakim();
8557
8566
  const moladStr = Locale.gettext('Molad', locale);
8558
- const minutesStr = Locale.lookupTranslation('min', locale) || 'minutes';
8567
+ const minutesStr = (_a = Locale.lookupTranslation('min', locale)) !== null && _a !== void 0 ? _a : 'minutes';
8559
8568
  const chalakimStr = Locale.gettext('chalakim', locale);
8560
8569
  if (isHebrewLocale) {
8561
- const ampm = hour < 5 ? night : hour < 12 ? morning :
8562
- hour < 17 ? afternoon : hour < 21 ? evening : night;
8570
+ const ampm = getHebrewTimeOfDay(hour);
8563
8571
  const result = `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` +
8564
8572
  `בְּשָׁעָה ${hour} ${ampm}, ` +
8565
8573
  `ו-${minutes} ${minutesStr} ` +
@@ -10066,7 +10074,7 @@ class DailyLearning {
10066
10074
  }
10067
10075
 
10068
10076
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
10069
- const version = '5.4.5';
10077
+ const version = '5.4.7';
10070
10078
 
10071
10079
  /* eslint-disable max-len */
10072
10080
  /**
@@ -10633,15 +10641,16 @@ function tachanunYear(year, il) {
10633
10641
  if (shushPurim.getDay() === 6) {
10634
10642
  shushPurim = shushPurim.next();
10635
10643
  }
10636
- const empty = [];
10637
- const none = empty.concat(
10644
+ const none = [
10645
+ new HDate(2, months.TISHREI, year), // Rosh Hashana II
10646
+ ].concat(
10638
10647
  // Rosh Chodesh - 1st of every month. Also includes RH day 1 (1 Tishrei)
10639
10648
  range(1, monthsInYear)
10640
10649
  .map((month) => new HDate(1, month, year)),
10641
10650
  // Rosh Chodesh - 30th of months that have one
10642
10651
  range(1, monthsInYear)
10643
10652
  .filter((month) => HDate.daysInMonth(month, year) === 30)
10644
- .map((month) => new HDate(30, month, year)), new HDate(2, months.TISHREI, year), // Rosh Hashana II
10653
+ .map((month) => new HDate(30, month, year)),
10645
10654
  // entire month of Nisan
10646
10655
  range(1, HDate.daysInMonth(months.NISAN, year))
10647
10656
  .map((mday) => new HDate(mday, months.NISAN, year)), new HDate(18, months.IYYAR, year), // Lag BaOmer
@@ -10658,13 +10667,15 @@ function tachanunYear(year, il) {
10658
10667
  .map((mday) => new HDate(mday, months.KISLEV, year)), new HDate(15, months.SHVAT, year), // Tu BiShvat
10659
10668
  new HDate(14, months.ADAR_II, year), // Purim
10660
10669
  shushPurim, leap ? new HDate(14, months.ADAR_I, year) : []);
10661
- const some = empty.concat(
10670
+ const some = [
10671
+ new HDate(14, months.IYYAR, year), // Pesach Sheini
10672
+ ].concat(
10662
10673
  // Until 14 Sivan
10663
10674
  range(1, 13)
10664
10675
  .map((mday) => new HDate(mday, months.SIVAN, year)),
10665
10676
  // Until after Rosh Chodesh Cheshvan
10666
10677
  range(20, 31)
10667
- .map((mday) => new HDate(mday, months.TISHREI, year)), new HDate(14, months.IYYAR, year), // Pesach Sheini
10678
+ .map((mday) => new HDate(mday, months.TISHREI, year)),
10668
10679
  // Yom HaAtzma'ut, which changes based on day of week
10669
10680
  year >= 5708 ? dateYomHaZikaron(year).next() : [],
10670
10681
  // Yom Yerushalayim
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ export { TimedEvent, CandleLightingEvent, HavdalahEvent } from './TimedEvent';
11
11
  export { Molad, MoladEvent } from './molad';
12
12
  export { OmerEvent } from './omer';
13
13
  export { TachanunResult } from './tachanun';
14
- export { Sedra, parshiot } from './sedra';
14
+ export { Sedra, SedraResult, parshiot } from './sedra';
15
15
  export { ParshaEvent } from './ParshaEvent';
16
16
  export { HolidayEvent, AsaraBTevetEvent, RoshChodeshEvent, RoshHashanaEvent } from './HolidayEvent';
17
17
  export { MevarchimChodeshEvent } from './MevarchimChodeshEvent';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v5.4.5 */
1
+ /*! @hebcal/core v5.4.7 */
2
2
  /* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
3
3
  /** @private */
4
4
  const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
@@ -8478,9 +8478,17 @@ class HavdalahEvent extends TimedEvent {
8478
8478
  const shortDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
8479
8479
  const heDayNames = ['רִאשׁוֹן', 'שֵׁנִי', 'שְׁלִישִׁי', 'רְבִיעִי', 'חֲמִישִׁי', 'שִׁישִּׁי', 'שַׁבָּת'];
8480
8480
  const night = 'בַּלַּ֥יְלָה';
8481
- const morning = 'בַּבֹּקֶר';
8482
- const afternoon = 'בַּצׇּהֳרַיִים';
8483
- const evening = 'בָּעֶרֶב';
8481
+ function getHebrewTimeOfDay(hour) {
8482
+ if (hour < 5)
8483
+ return night;
8484
+ else if (hour < 12)
8485
+ return 'בַּבֹּקֶר';
8486
+ else if (hour < 17)
8487
+ return 'בַּצׇּהֳרַיִים';
8488
+ else if (hour < 21)
8489
+ return 'בָּעֶרֶב';
8490
+ return night;
8491
+ }
8484
8492
  /**
8485
8493
  * Represents a molad, the moment when the new moon is "born"
8486
8494
  */
@@ -8541,6 +8549,7 @@ class Molad {
8541
8549
  * @return {string}
8542
8550
  */
8543
8551
  render(locale, options) {
8552
+ var _a;
8544
8553
  locale = locale !== null && locale !== void 0 ? locale : Locale.getLocaleName();
8545
8554
  if (typeof locale === 'string') {
8546
8555
  locale = locale.toLowerCase();
@@ -8553,11 +8562,10 @@ class Molad {
8553
8562
  const hour = this.getHour();
8554
8563
  const chalakim = this.getChalakim();
8555
8564
  const moladStr = Locale.gettext('Molad', locale);
8556
- const minutesStr = Locale.lookupTranslation('min', locale) || 'minutes';
8565
+ const minutesStr = (_a = Locale.lookupTranslation('min', locale)) !== null && _a !== void 0 ? _a : 'minutes';
8557
8566
  const chalakimStr = Locale.gettext('chalakim', locale);
8558
8567
  if (isHebrewLocale) {
8559
- const ampm = hour < 5 ? night : hour < 12 ? morning :
8560
- hour < 17 ? afternoon : hour < 21 ? evening : night;
8568
+ const ampm = getHebrewTimeOfDay(hour);
8561
8569
  const result = `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` +
8562
8570
  `בְּשָׁעָה ${hour} ${ampm}, ` +
8563
8571
  `ו-${minutes} ${minutesStr} ` +
@@ -10064,7 +10072,7 @@ class DailyLearning {
10064
10072
  }
10065
10073
 
10066
10074
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
10067
- const version = '5.4.5';
10075
+ const version = '5.4.7';
10068
10076
 
10069
10077
  /* eslint-disable max-len */
10070
10078
  /**
@@ -10631,15 +10639,16 @@ function tachanunYear(year, il) {
10631
10639
  if (shushPurim.getDay() === 6) {
10632
10640
  shushPurim = shushPurim.next();
10633
10641
  }
10634
- const empty = [];
10635
- const none = empty.concat(
10642
+ const none = [
10643
+ new HDate(2, months.TISHREI, year), // Rosh Hashana II
10644
+ ].concat(
10636
10645
  // Rosh Chodesh - 1st of every month. Also includes RH day 1 (1 Tishrei)
10637
10646
  range(1, monthsInYear)
10638
10647
  .map((month) => new HDate(1, month, year)),
10639
10648
  // Rosh Chodesh - 30th of months that have one
10640
10649
  range(1, monthsInYear)
10641
10650
  .filter((month) => HDate.daysInMonth(month, year) === 30)
10642
- .map((month) => new HDate(30, month, year)), new HDate(2, months.TISHREI, year), // Rosh Hashana II
10651
+ .map((month) => new HDate(30, month, year)),
10643
10652
  // entire month of Nisan
10644
10653
  range(1, HDate.daysInMonth(months.NISAN, year))
10645
10654
  .map((mday) => new HDate(mday, months.NISAN, year)), new HDate(18, months.IYYAR, year), // Lag BaOmer
@@ -10656,13 +10665,15 @@ function tachanunYear(year, il) {
10656
10665
  .map((mday) => new HDate(mday, months.KISLEV, year)), new HDate(15, months.SHVAT, year), // Tu BiShvat
10657
10666
  new HDate(14, months.ADAR_II, year), // Purim
10658
10667
  shushPurim, leap ? new HDate(14, months.ADAR_I, year) : []);
10659
- const some = empty.concat(
10668
+ const some = [
10669
+ new HDate(14, months.IYYAR, year), // Pesach Sheini
10670
+ ].concat(
10660
10671
  // Until 14 Sivan
10661
10672
  range(1, 13)
10662
10673
  .map((mday) => new HDate(mday, months.SIVAN, year)),
10663
10674
  // Until after Rosh Chodesh Cheshvan
10664
10675
  range(20, 31)
10665
- .map((mday) => new HDate(mday, months.TISHREI, year)), new HDate(14, months.IYYAR, year), // Pesach Sheini
10676
+ .map((mday) => new HDate(mday, months.TISHREI, year)),
10666
10677
  // Yom HaAtzma'ut, which changes based on day of week
10667
10678
  year >= 5708 ? dateYomHaZikaron(year).next() : [],
10668
10679
  // Yom Yerushalayim
@@ -1,2 +1,2 @@
1
1
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
2
- export declare const version = "5.4.5";
2
+ export declare const version = "5.4.7";
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.47.0"
9
+ }
10
+ ]
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/core",
3
- "version": "5.4.5",
3
+ "version": "5.4.7",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "contributors": [
6
6
  "Eyal Schachter (https://github.com/Scimonster)",
@@ -41,8 +41,7 @@
41
41
  "url": "https://github.com/hebcal/hebcal-es6/issues"
42
42
  },
43
43
  "files": [
44
- "dist",
45
- "po"
44
+ "dist"
46
45
  ],
47
46
  "scripts": {
48
47
  "build:rollup": "rollup -c",
@@ -86,7 +85,7 @@
86
85
  "quick-lru": "<=6.1.2",
87
86
  "rollup": "^4.18.0",
88
87
  "ttag-cli": "^1.10.12",
89
- "typescript": "^5.4.5"
88
+ "typescript": "^5.5.3"
90
89
  },
91
90
  "dependencies": {
92
91
  "@hebcal/hdate": "^0.10.1",
package/po/ashkenazi.po DELETED
@@ -1,192 +0,0 @@
1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) YEAR Danny Sadinoff
3
- # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- msgid ""
7
- msgstr ""
8
- "Project-Id-Version: hebcal 4.2\n"
9
- "Report-Msgid-Bugs-To: hebcal-bugs@sadinoff.com\n"
10
- "POT-Creation-Date: 2015-12-30 14:54-0500\n"
11
- "PO-Revision-Date: 2020-05-03 11:18-0800\n"
12
- "Language: en_CA@ashkenazi\n"
13
- "MIME-Version: 1.0\n"
14
- "Content-Type: text/plain; charset=utf-8\n"
15
- "Content-Transfer-Encoding: 8bit\n"
16
- "Last-Translator: \n"
17
- "Language-Team: \n"
18
- "X-Generator: Poedit 1.8.6\n"
19
- "Plural-Forms: nplurals=2; plural=(n > 1);\n"
20
-
21
- #: ../dafyomi.c:27
22
- msgid "Shabbat"
23
- msgstr "Shabbos"
24
-
25
- msgid "Achrei Mot"
26
- msgstr "Achrei Mos"
27
-
28
- msgid "Bechukotai"
29
- msgstr "Bechukosai"
30
-
31
- msgid "Beha'alotcha"
32
- msgstr "Beha’aloscha"
33
-
34
- msgid "Bereshit"
35
- msgstr "Bereshis"
36
-
37
- msgid "Chukat"
38
- msgstr "Chukas"
39
-
40
- msgid "Erev Shavuot"
41
- msgstr "Erev Shavuos"
42
-
43
- msgid "Erev Sukkot"
44
- msgstr "Erev Sukkos"
45
-
46
- msgid "Ki Tavo"
47
- msgstr "Ki Savo"
48
-
49
- msgid "Ki Teitzei"
50
- msgstr "Ki Seitzei"
51
-
52
- msgid "Ki Tisa"
53
- msgstr "Ki Sisa"
54
-
55
- msgid "Matot"
56
- msgstr "Matos"
57
-
58
- msgid "Purim Katan"
59
- msgstr "Purim Koton"
60
-
61
- msgid "Shabbat Chazon"
62
- msgstr "Shabbos Chazon"
63
-
64
- msgid "Shabbat HaChodesh"
65
- msgstr "Shabbos HaChodesh"
66
-
67
- msgid "Shabbat HaGadol"
68
- msgstr "Shabbos HaGadol"
69
-
70
- msgid "Shabbat Nachamu"
71
- msgstr "Shabbos Nachamu"
72
-
73
- msgid "Shabbat Parah"
74
- msgstr "Shabbos Parah"
75
-
76
- msgid "Shabbat Shekalim"
77
- msgstr "Shabbos Shekalim"
78
-
79
- msgid "Shabbat Shuva"
80
- msgstr "Shabbos Shuvah"
81
-
82
- msgid "Shabbat Zachor"
83
- msgstr "Shabbos Zachor"
84
-
85
- msgid "Shavuot"
86
- msgstr "Shavuos"
87
-
88
- msgid "Shavuot I"
89
- msgstr "Shavuos I"
90
-
91
- msgid "Shavuot II"
92
- msgstr "Shavuos II"
93
-
94
- msgid "Shemot"
95
- msgstr "Shemos"
96
-
97
- msgid "Shmini Atzeret"
98
- msgstr "Shmini Atzeres"
99
-
100
- msgid "Simchat Torah"
101
- msgstr "Simchas Torah"
102
-
103
- msgid "Sukkot"
104
- msgstr "Sukkos"
105
-
106
- msgid "Sukkot I"
107
- msgstr "Sukkos I"
108
-
109
- msgid "Sukkot II"
110
- msgstr "Sukkos II"
111
-
112
- msgid "Sukkot II (CH''M)"
113
- msgstr "Sukkos II (CH’’M)"
114
-
115
- msgid "Sukkot III (CH''M)"
116
- msgstr "Sukkos III (CH’’M)"
117
-
118
- msgid "Sukkot IV (CH''M)"
119
- msgstr "Sukkos IV (CH’’M)"
120
-
121
- msgid "Sukkot V (CH''M)"
122
- msgstr "Sukkos V (CH’’M)"
123
-
124
- msgid "Sukkot VI (CH''M)"
125
- msgstr "Sukkos VI (CH’’M)"
126
-
127
- msgid "Sukkot VII (Hoshana Raba)"
128
- msgstr "Sukkos VII (Hoshana Raba)"
129
-
130
- msgid "Ta'anit Bechorot"
131
- msgstr "Ta’anis Bechoros"
132
-
133
- msgid "Ta'anit Esther"
134
- msgstr "Ta’anis Esther"
135
-
136
- msgid "Toldot"
137
- msgstr "Toldos"
138
-
139
- msgid "Vaetchanan"
140
- msgstr "Vaeschanan"
141
-
142
- msgid "Yitro"
143
- msgstr "Yisro"
144
-
145
- msgid "Vezot Haberakhah"
146
- msgstr "Vezos Haberakhah"
147
-
148
- msgid "Parashat"
149
- msgstr "Parshas"
150
-
151
- msgid "Leil Selichot"
152
- msgstr "Leil Selichos"
153
-
154
- msgid "Shabbat Mevarchim Chodesh"
155
- msgstr "Shabbos Mevorchim Chodesh"
156
-
157
- msgid "Shabbat Shirah"
158
- msgstr "Shabbos Shirah"
159
-
160
- msgid "Asara B'Tevet"
161
- msgstr "Asara B’Teves"
162
-
163
- # hebcal/hebcal zmanim (unused by hebcal/hebcal-es6)
164
- msgid "Alot HaShachar"
165
- msgstr "Alos HaShachar"
166
-
167
- msgid "Kriat Shema, sof zeman"
168
- msgstr "Krias Shema, sof zman"
169
-
170
- msgid "Tefilah, sof zeman"
171
- msgstr "Tefilah, sof zman"
172
-
173
- msgid "Kriat Shema, sof zeman (MGA)"
174
- msgstr "Krias Shema, sof zman (MGA)"
175
-
176
- msgid "Tefilah, sof zeman (MGA)"
177
- msgstr "Tefilah, sof zman (MGA)"
178
-
179
- msgid "Chatzot HaLailah"
180
- msgstr "Chatzos HaLailah"
181
-
182
- msgid "Chatzot hayom"
183
- msgstr "Chatzos"
184
-
185
- msgid "Tzeit HaKochavim"
186
- msgstr "Tzeis HaKochavim"
187
-
188
- msgid "Birkat Hachamah"
189
- msgstr "Birkas Hachamah"
190
-
191
- msgid "Shushan Purim Katan"
192
- msgstr "Shushan Purim Koton"