@hebcal/core 5.0.7 → 5.0.9

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.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v5.0.7 */
1
+ /*! @hebcal/core v5.0.9 */
2
2
  'use strict';
3
3
 
4
4
  /** @private */
@@ -1272,7 +1272,8 @@ class HDate {
1272
1272
  render(locale = null, showYear = true) {
1273
1273
  const locale0 = locale || Locale.getLocaleName();
1274
1274
  const day = this.getDate();
1275
- const monthName = Locale.gettext(this.getMonthName(), locale0);
1275
+ const monthName0 = Locale.gettext(this.getMonthName(), locale0);
1276
+ const monthName = monthName0.replace(/'/g, '’');
1276
1277
  const nth = Locale.ordinal(day, locale0);
1277
1278
  const dayOf = HDate.getDayOfTranslation(locale0);
1278
1279
  const dateStr = `${nth}${dayOf} ${monthName}`;
@@ -4309,7 +4310,8 @@ class Molad {
4309
4310
  return `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` + `בְּשָׁעָה ${hour} ${ampm}, ` + `ו-${minutes} ${minutesStr} ` + `ו-${chalakim} ${chalakimStr}`;
4310
4311
  }
4311
4312
  const fmtTime = reformatTimeStr(`${hour}:00`, 'pm', options);
4312
- return `${moladStr} ${monthName}: ${dow}, ${minutes} ${minutesStr} and ${chalakim} ${chalakimStr} after ${fmtTime}`;
4313
+ const month = monthName.replace(/'/g, '’');
4314
+ return `${moladStr} ${month}: ${dow}, ${minutes} ${minutesStr} and ${chalakim} ${chalakimStr} after ${fmtTime}`;
4313
4315
  }
4314
4316
  }
4315
4317
 
@@ -5276,6 +5278,7 @@ class ParshaEvent extends Event {
5276
5278
  const hyphen = locale0 == 'he' ? '־' : '-';
5277
5279
  name += hyphen + Locale.gettext(parsha[1], locale);
5278
5280
  }
5281
+ name = name.replace(/'/g, '’');
5279
5282
  const str = Locale.gettext('Parashat', locale) + ' ' + name;
5280
5283
  return str.normalize();
5281
5284
  }
@@ -5857,6 +5860,26 @@ class HolidayEvent extends Event {
5857
5860
  return ['holiday', 'major'];
5858
5861
  }
5859
5862
  }
5863
+ /**
5864
+ * Returns (translated) description of this event
5865
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5866
+ * @return {string}
5867
+ */
5868
+ render(locale) {
5869
+ const str = super.render(locale);
5870
+ return str.replace(/'/g, '’');
5871
+ }
5872
+ /**
5873
+ * Returns a brief (translated) description of this event.
5874
+ * For most events, this is the same as render(). For some events, it procudes
5875
+ * a shorter text (e.g. without a time or added description).
5876
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5877
+ * @return {string}
5878
+ */
5879
+ renderBrief(locale) {
5880
+ const str = super.renderBrief(locale);
5881
+ return str.replace(/'/g, '’');
5882
+ }
5860
5883
  }
5861
5884
  const roshChodeshStr = 'Rosh Chodesh';
5862
5885
 
@@ -5877,7 +5900,9 @@ class RoshChodeshEvent extends HolidayEvent {
5877
5900
  */
5878
5901
  render(locale) {
5879
5902
  const monthName = this.getDesc().substring(roshChodeshStr.length + 1);
5880
- return Locale.gettext(roshChodeshStr, locale) + ' ' + Locale.gettext(monthName, locale);
5903
+ const monthName0 = Locale.gettext(monthName, locale);
5904
+ const monthName1 = monthName0.replace(/'/g, '’');
5905
+ return Locale.gettext(roshChodeshStr, locale) + ' ' + monthName1;
5881
5906
  }
5882
5907
  /** @return {string} */
5883
5908
  basename() {
@@ -5931,7 +5956,19 @@ class MevarchimChodeshEvent extends Event {
5931
5956
  * @return {string}
5932
5957
  */
5933
5958
  render(locale) {
5934
- return Locale.gettext(mevarchimChodeshStr, locale) + ' ' + Locale.gettext(this.monthName, locale);
5959
+ const monthName0 = Locale.gettext(this.monthName, locale);
5960
+ const monthName = monthName0.replace(/'/g, '’');
5961
+ return Locale.gettext(mevarchimChodeshStr, locale) + ' ' + monthName;
5962
+ }
5963
+ /**
5964
+ * Returns (translated) description of this event
5965
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5966
+ * @return {string}
5967
+ */
5968
+ renderBrief(locale) {
5969
+ const str = this.render(locale);
5970
+ const space = str.indexOf(' ');
5971
+ return str.substring(space + 1);
5935
5972
  }
5936
5973
  }
5937
5974
 
@@ -5983,7 +6020,9 @@ class YomKippurKatanEvent extends HolidayEvent {
5983
6020
  * @return {string}
5984
6021
  */
5985
6022
  render(locale) {
5986
- return Locale.gettext(ykk, locale) + ' ' + Locale.gettext(this.nextMonthName, locale);
6023
+ const monthName0 = Locale.gettext(this.nextMonthName, locale);
6024
+ const monthName = monthName0.replace(/'/g, '’');
6025
+ return Locale.gettext(ykk, locale) + ' ' + monthName;
5987
6026
  }
5988
6027
  /**
5989
6028
  * @param {string} [locale] Optional locale name (defaults to active locale).
@@ -6273,7 +6312,7 @@ class DailyLearning {
6273
6312
  }
6274
6313
 
6275
6314
  // DO NOT EDIT THIS AUTO-GENERATED FILE!
6276
- const version = '5.0.7';
6315
+ const version = '5.0.9';
6277
6316
 
6278
6317
  const NONE$1 = 0;
6279
6318
  const HALF = 1;
@@ -6324,7 +6363,7 @@ var poAshkenazi = {
6324
6363
  "Shabbat": ["Shabbos"],
6325
6364
  "Achrei Mot": ["Achrei Mos"],
6326
6365
  "Bechukotai": ["Bechukosai"],
6327
- "Beha'alotcha": ["Beha'aloscha"],
6366
+ "Beha'alotcha": ["Behaaloscha"],
6328
6367
  "Bereshit": ["Bereshis"],
6329
6368
  "Chukat": ["Chukas"],
6330
6369
  "Erev Shavuot": ["Erev Shavuos"],
@@ -6351,14 +6390,14 @@ var poAshkenazi = {
6351
6390
  "Sukkot": ["Sukkos"],
6352
6391
  "Sukkot I": ["Sukkos I"],
6353
6392
  "Sukkot II": ["Sukkos II"],
6354
- "Sukkot II (CH''M)": ["Sukkos II (CH''M)"],
6355
- "Sukkot III (CH''M)": ["Sukkos III (CH''M)"],
6356
- "Sukkot IV (CH''M)": ["Sukkos IV (CH''M)"],
6357
- "Sukkot V (CH''M)": ["Sukkos V (CH''M)"],
6358
- "Sukkot VI (CH''M)": ["Sukkos VI (CH''M)"],
6393
+ "Sukkot II (CH''M)": ["Sukkos II (CH’’M)"],
6394
+ "Sukkot III (CH''M)": ["Sukkos III (CH’’M)"],
6395
+ "Sukkot IV (CH''M)": ["Sukkos IV (CH’’M)"],
6396
+ "Sukkot V (CH''M)": ["Sukkos V (CH’’M)"],
6397
+ "Sukkot VI (CH''M)": ["Sukkos VI (CH’’M)"],
6359
6398
  "Sukkot VII (Hoshana Raba)": ["Sukkos VII (Hoshana Raba)"],
6360
- "Ta'anit Bechorot": ["Ta'anis Bechoros"],
6361
- "Ta'anit Esther": ["Ta'anis Esther"],
6399
+ "Ta'anit Bechorot": ["Taanis Bechoros"],
6400
+ "Ta'anit Esther": ["Taanis Esther"],
6362
6401
  "Toldot": ["Toldos"],
6363
6402
  "Vaetchanan": ["Vaeschanan"],
6364
6403
  "Yitro": ["Yisro"],
@@ -6368,7 +6407,7 @@ var poAshkenazi = {
6368
6407
  "Shabbat Mevarchim Chodesh": ["Shabbos Mevorchim Chodesh"],
6369
6408
  "Shabbat Shirah": ["Shabbos Shirah"],
6370
6409
  "Tevet": ["Teves"],
6371
- "Asara B'Tevet": ["Asara B'Teves"],
6410
+ "Asara B'Tevet": ["Asara BTeves"],
6372
6411
  "Alot HaShachar": ["Alos HaShachar"],
6373
6412
  "Kriat Shema, sof zeman": ["Krias Shema, sof zman"],
6374
6413
  "Tefilah, sof zeman": ["Tefilah, sof zman"],
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v5.0.7 */
1
+ /*! @hebcal/core v5.0.9 */
2
2
  /** @private */
3
3
  const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
4
4
  /** @private */
@@ -1270,7 +1270,8 @@ class HDate {
1270
1270
  render(locale = null, showYear = true) {
1271
1271
  const locale0 = locale || Locale.getLocaleName();
1272
1272
  const day = this.getDate();
1273
- const monthName = Locale.gettext(this.getMonthName(), locale0);
1273
+ const monthName0 = Locale.gettext(this.getMonthName(), locale0);
1274
+ const monthName = monthName0.replace(/'/g, '’');
1274
1275
  const nth = Locale.ordinal(day, locale0);
1275
1276
  const dayOf = HDate.getDayOfTranslation(locale0);
1276
1277
  const dateStr = `${nth}${dayOf} ${monthName}`;
@@ -4307,7 +4308,8 @@ class Molad {
4307
4308
  return `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` + `בְּשָׁעָה ${hour} ${ampm}, ` + `ו-${minutes} ${minutesStr} ` + `ו-${chalakim} ${chalakimStr}`;
4308
4309
  }
4309
4310
  const fmtTime = reformatTimeStr(`${hour}:00`, 'pm', options);
4310
- return `${moladStr} ${monthName}: ${dow}, ${minutes} ${minutesStr} and ${chalakim} ${chalakimStr} after ${fmtTime}`;
4311
+ const month = monthName.replace(/'/g, '’');
4312
+ return `${moladStr} ${month}: ${dow}, ${minutes} ${minutesStr} and ${chalakim} ${chalakimStr} after ${fmtTime}`;
4311
4313
  }
4312
4314
  }
4313
4315
 
@@ -5274,6 +5276,7 @@ class ParshaEvent extends Event {
5274
5276
  const hyphen = locale0 == 'he' ? '־' : '-';
5275
5277
  name += hyphen + Locale.gettext(parsha[1], locale);
5276
5278
  }
5279
+ name = name.replace(/'/g, '’');
5277
5280
  const str = Locale.gettext('Parashat', locale) + ' ' + name;
5278
5281
  return str.normalize();
5279
5282
  }
@@ -5855,6 +5858,26 @@ class HolidayEvent extends Event {
5855
5858
  return ['holiday', 'major'];
5856
5859
  }
5857
5860
  }
5861
+ /**
5862
+ * Returns (translated) description of this event
5863
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5864
+ * @return {string}
5865
+ */
5866
+ render(locale) {
5867
+ const str = super.render(locale);
5868
+ return str.replace(/'/g, '’');
5869
+ }
5870
+ /**
5871
+ * Returns a brief (translated) description of this event.
5872
+ * For most events, this is the same as render(). For some events, it procudes
5873
+ * a shorter text (e.g. without a time or added description).
5874
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5875
+ * @return {string}
5876
+ */
5877
+ renderBrief(locale) {
5878
+ const str = super.renderBrief(locale);
5879
+ return str.replace(/'/g, '’');
5880
+ }
5858
5881
  }
5859
5882
  const roshChodeshStr = 'Rosh Chodesh';
5860
5883
 
@@ -5875,7 +5898,9 @@ class RoshChodeshEvent extends HolidayEvent {
5875
5898
  */
5876
5899
  render(locale) {
5877
5900
  const monthName = this.getDesc().substring(roshChodeshStr.length + 1);
5878
- return Locale.gettext(roshChodeshStr, locale) + ' ' + Locale.gettext(monthName, locale);
5901
+ const monthName0 = Locale.gettext(monthName, locale);
5902
+ const monthName1 = monthName0.replace(/'/g, '’');
5903
+ return Locale.gettext(roshChodeshStr, locale) + ' ' + monthName1;
5879
5904
  }
5880
5905
  /** @return {string} */
5881
5906
  basename() {
@@ -5929,7 +5954,19 @@ class MevarchimChodeshEvent extends Event {
5929
5954
  * @return {string}
5930
5955
  */
5931
5956
  render(locale) {
5932
- return Locale.gettext(mevarchimChodeshStr, locale) + ' ' + Locale.gettext(this.monthName, locale);
5957
+ const monthName0 = Locale.gettext(this.monthName, locale);
5958
+ const monthName = monthName0.replace(/'/g, '’');
5959
+ return Locale.gettext(mevarchimChodeshStr, locale) + ' ' + monthName;
5960
+ }
5961
+ /**
5962
+ * Returns (translated) description of this event
5963
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5964
+ * @return {string}
5965
+ */
5966
+ renderBrief(locale) {
5967
+ const str = this.render(locale);
5968
+ const space = str.indexOf(' ');
5969
+ return str.substring(space + 1);
5933
5970
  }
5934
5971
  }
5935
5972
 
@@ -5981,7 +6018,9 @@ class YomKippurKatanEvent extends HolidayEvent {
5981
6018
  * @return {string}
5982
6019
  */
5983
6020
  render(locale) {
5984
- return Locale.gettext(ykk, locale) + ' ' + Locale.gettext(this.nextMonthName, locale);
6021
+ const monthName0 = Locale.gettext(this.nextMonthName, locale);
6022
+ const monthName = monthName0.replace(/'/g, '’');
6023
+ return Locale.gettext(ykk, locale) + ' ' + monthName;
5985
6024
  }
5986
6025
  /**
5987
6026
  * @param {string} [locale] Optional locale name (defaults to active locale).
@@ -6271,7 +6310,7 @@ class DailyLearning {
6271
6310
  }
6272
6311
 
6273
6312
  // DO NOT EDIT THIS AUTO-GENERATED FILE!
6274
- const version = '5.0.7';
6313
+ const version = '5.0.9';
6275
6314
 
6276
6315
  const NONE$1 = 0;
6277
6316
  const HALF = 1;
@@ -6322,7 +6361,7 @@ var poAshkenazi = {
6322
6361
  "Shabbat": ["Shabbos"],
6323
6362
  "Achrei Mot": ["Achrei Mos"],
6324
6363
  "Bechukotai": ["Bechukosai"],
6325
- "Beha'alotcha": ["Beha'aloscha"],
6364
+ "Beha'alotcha": ["Behaaloscha"],
6326
6365
  "Bereshit": ["Bereshis"],
6327
6366
  "Chukat": ["Chukas"],
6328
6367
  "Erev Shavuot": ["Erev Shavuos"],
@@ -6349,14 +6388,14 @@ var poAshkenazi = {
6349
6388
  "Sukkot": ["Sukkos"],
6350
6389
  "Sukkot I": ["Sukkos I"],
6351
6390
  "Sukkot II": ["Sukkos II"],
6352
- "Sukkot II (CH''M)": ["Sukkos II (CH''M)"],
6353
- "Sukkot III (CH''M)": ["Sukkos III (CH''M)"],
6354
- "Sukkot IV (CH''M)": ["Sukkos IV (CH''M)"],
6355
- "Sukkot V (CH''M)": ["Sukkos V (CH''M)"],
6356
- "Sukkot VI (CH''M)": ["Sukkos VI (CH''M)"],
6391
+ "Sukkot II (CH''M)": ["Sukkos II (CH’’M)"],
6392
+ "Sukkot III (CH''M)": ["Sukkos III (CH’’M)"],
6393
+ "Sukkot IV (CH''M)": ["Sukkos IV (CH’’M)"],
6394
+ "Sukkot V (CH''M)": ["Sukkos V (CH’’M)"],
6395
+ "Sukkot VI (CH''M)": ["Sukkos VI (CH’’M)"],
6357
6396
  "Sukkot VII (Hoshana Raba)": ["Sukkos VII (Hoshana Raba)"],
6358
- "Ta'anit Bechorot": ["Ta'anis Bechoros"],
6359
- "Ta'anit Esther": ["Ta'anis Esther"],
6397
+ "Ta'anit Bechorot": ["Taanis Bechoros"],
6398
+ "Ta'anit Esther": ["Taanis Esther"],
6360
6399
  "Toldot": ["Toldos"],
6361
6400
  "Vaetchanan": ["Vaeschanan"],
6362
6401
  "Yitro": ["Yisro"],
@@ -6366,7 +6405,7 @@ var poAshkenazi = {
6366
6405
  "Shabbat Mevarchim Chodesh": ["Shabbos Mevorchim Chodesh"],
6367
6406
  "Shabbat Shirah": ["Shabbos Shirah"],
6368
6407
  "Tevet": ["Teves"],
6369
- "Asara B'Tevet": ["Asara B'Teves"],
6408
+ "Asara B'Tevet": ["Asara BTeves"],
6370
6409
  "Alot HaShachar": ["Alos HaShachar"],
6371
6410
  "Kriat Shema, sof zeman": ["Krias Shema, sof zman"],
6372
6411
  "Tefilah, sof zeman": ["Tefilah, sof zman"],
package/hebcal.d.ts CHANGED
@@ -365,8 +365,13 @@ declare module '@hebcal/core' {
365
365
  * @param gloc GeoLocation including latitude, longitude, and timezone
366
366
  * @param date Regular or Hebrew Date. If `date` is a regular `Date`,
367
367
  * hours, minutes, seconds and milliseconds are ignored
368
+ * @param useElevation use elevation for calculations (default `false`).
369
+ * If `true`, use elevation to affect the calculation of all sunrise/sunset based
370
+ * zmanim. Note: there are some zmanim such as degree-based zmanim that are driven
371
+ * by the amount of light in the sky and are not impacted by elevation.
372
+ * These zmanim intentionally do not support elevation adjustment.
368
373
  */
369
- constructor(gloc: GeoLocation, date: Date | HDate);
374
+ constructor(gloc: GeoLocation, date: Date | HDate, useElevation?: boolean);
370
375
 
371
376
  /**
372
377
  * Returns a string like "2022-04-01T13:06:00-11:00"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/core",
3
- "version": "5.0.7",
3
+ "version": "5.0.9",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "contributors": [
6
6
  "Eyal Schachter (https://github.com/Scimonster)",
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "devDependencies": {
74
74
  "@babel/core": "^7.23.7",
75
- "@babel/preset-env": "^7.23.7",
75
+ "@babel/preset-env": "^7.23.8",
76
76
  "@babel/register": "^7.23.7",
77
77
  "@hebcal/hdate": "^0.9.1",
78
78
  "@hebcal/noaa": "^0.8.11",
@@ -89,7 +89,7 @@
89
89
  "jsdoc-to-markdown": "^8.0.0",
90
90
  "nyc": "^15.1.0",
91
91
  "quick-lru": "^7.0.0",
92
- "rollup": "^4.9.2",
92
+ "rollup": "^4.9.5",
93
93
  "ttag-cli": "^1.10.10"
94
94
  }
95
95
  }
package/po/ashkenazi.po CHANGED
@@ -29,7 +29,7 @@ msgid "Bechukotai"
29
29
  msgstr "Bechukosai"
30
30
 
31
31
  msgid "Beha'alotcha"
32
- msgstr "Beha'aloscha"
32
+ msgstr "Behaaloscha"
33
33
 
34
34
  msgid "Bereshit"
35
35
  msgstr "Bereshis"
@@ -110,28 +110,28 @@ msgid "Sukkot II"
110
110
  msgstr "Sukkos II"
111
111
 
112
112
  msgid "Sukkot II (CH''M)"
113
- msgstr "Sukkos II (CH''M)"
113
+ msgstr "Sukkos II (CH’’M)"
114
114
 
115
115
  msgid "Sukkot III (CH''M)"
116
- msgstr "Sukkos III (CH''M)"
116
+ msgstr "Sukkos III (CH’’M)"
117
117
 
118
118
  msgid "Sukkot IV (CH''M)"
119
- msgstr "Sukkos IV (CH''M)"
119
+ msgstr "Sukkos IV (CH’’M)"
120
120
 
121
121
  msgid "Sukkot V (CH''M)"
122
- msgstr "Sukkos V (CH''M)"
122
+ msgstr "Sukkos V (CH’’M)"
123
123
 
124
124
  msgid "Sukkot VI (CH''M)"
125
- msgstr "Sukkos VI (CH''M)"
125
+ msgstr "Sukkos VI (CH’’M)"
126
126
 
127
127
  msgid "Sukkot VII (Hoshana Raba)"
128
128
  msgstr "Sukkos VII (Hoshana Raba)"
129
129
 
130
130
  msgid "Ta'anit Bechorot"
131
- msgstr "Ta'anis Bechoros"
131
+ msgstr "Taanis Bechoros"
132
132
 
133
133
  msgid "Ta'anit Esther"
134
- msgstr "Ta'anis Esther"
134
+ msgstr "Taanis Esther"
135
135
 
136
136
  msgid "Toldot"
137
137
  msgstr "Toldos"
@@ -161,7 +161,7 @@ msgid "Tevet"
161
161
  msgstr "Teves"
162
162
 
163
163
  msgid "Asara B'Tevet"
164
- msgstr "Asara B'Teves"
164
+ msgstr "Asara BTeves"
165
165
 
166
166
  # hebcal/hebcal zmanim (unused by hebcal/hebcal-es6)
167
167
  msgid "Alot HaShachar"