@hebcal/core 5.0.7 → 5.0.8

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.8 */
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
 
@@ -5857,6 +5859,26 @@ class HolidayEvent extends Event {
5857
5859
  return ['holiday', 'major'];
5858
5860
  }
5859
5861
  }
5862
+ /**
5863
+ * Returns (translated) description of this event
5864
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5865
+ * @return {string}
5866
+ */
5867
+ render(locale) {
5868
+ const str = super.render(locale);
5869
+ return str.replace(/'/g, '’');
5870
+ }
5871
+ /**
5872
+ * Returns a brief (translated) description of this event.
5873
+ * For most events, this is the same as render(). For some events, it procudes
5874
+ * a shorter text (e.g. without a time or added description).
5875
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5876
+ * @return {string}
5877
+ */
5878
+ renderBrief(locale) {
5879
+ const str = super.renderBrief(locale);
5880
+ return str.replace(/'/g, '’');
5881
+ }
5860
5882
  }
5861
5883
  const roshChodeshStr = 'Rosh Chodesh';
5862
5884
 
@@ -5877,7 +5899,9 @@ class RoshChodeshEvent extends HolidayEvent {
5877
5899
  */
5878
5900
  render(locale) {
5879
5901
  const monthName = this.getDesc().substring(roshChodeshStr.length + 1);
5880
- return Locale.gettext(roshChodeshStr, locale) + ' ' + Locale.gettext(monthName, locale);
5902
+ const monthName0 = Locale.gettext(monthName, locale);
5903
+ const monthName1 = monthName0.replace(/'/g, '’');
5904
+ return Locale.gettext(roshChodeshStr, locale) + ' ' + monthName1;
5881
5905
  }
5882
5906
  /** @return {string} */
5883
5907
  basename() {
@@ -5931,7 +5955,19 @@ class MevarchimChodeshEvent extends Event {
5931
5955
  * @return {string}
5932
5956
  */
5933
5957
  render(locale) {
5934
- return Locale.gettext(mevarchimChodeshStr, locale) + ' ' + Locale.gettext(this.monthName, locale);
5958
+ const monthName0 = Locale.gettext(this.monthName, locale);
5959
+ const monthName = monthName0.replace(/'/g, '’');
5960
+ return Locale.gettext(mevarchimChodeshStr, locale) + ' ' + monthName;
5961
+ }
5962
+ /**
5963
+ * Returns (translated) description of this event
5964
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5965
+ * @return {string}
5966
+ */
5967
+ renderBrief(locale) {
5968
+ const str = this.render(locale);
5969
+ const space = str.indexOf(' ');
5970
+ return str.substring(space + 1);
5935
5971
  }
5936
5972
  }
5937
5973
 
@@ -5983,7 +6019,9 @@ class YomKippurKatanEvent extends HolidayEvent {
5983
6019
  * @return {string}
5984
6020
  */
5985
6021
  render(locale) {
5986
- return Locale.gettext(ykk, locale) + ' ' + Locale.gettext(this.nextMonthName, locale);
6022
+ const monthName0 = Locale.gettext(this.nextMonthName, locale);
6023
+ const monthName = monthName0.replace(/'/g, '’');
6024
+ return Locale.gettext(ykk, locale) + ' ' + monthName;
5987
6025
  }
5988
6026
  /**
5989
6027
  * @param {string} [locale] Optional locale name (defaults to active locale).
@@ -6273,7 +6311,7 @@ class DailyLearning {
6273
6311
  }
6274
6312
 
6275
6313
  // DO NOT EDIT THIS AUTO-GENERATED FILE!
6276
- const version = '5.0.7';
6314
+ const version = '5.0.8';
6277
6315
 
6278
6316
  const NONE$1 = 0;
6279
6317
  const HALF = 1;
@@ -6324,7 +6362,7 @@ var poAshkenazi = {
6324
6362
  "Shabbat": ["Shabbos"],
6325
6363
  "Achrei Mot": ["Achrei Mos"],
6326
6364
  "Bechukotai": ["Bechukosai"],
6327
- "Beha'alotcha": ["Beha'aloscha"],
6365
+ "Beha'alotcha": ["Behaaloscha"],
6328
6366
  "Bereshit": ["Bereshis"],
6329
6367
  "Chukat": ["Chukas"],
6330
6368
  "Erev Shavuot": ["Erev Shavuos"],
@@ -6351,14 +6389,14 @@ var poAshkenazi = {
6351
6389
  "Sukkot": ["Sukkos"],
6352
6390
  "Sukkot I": ["Sukkos I"],
6353
6391
  "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)"],
6392
+ "Sukkot II (CH''M)": ["Sukkos II (CH’’M)"],
6393
+ "Sukkot III (CH''M)": ["Sukkos III (CH’’M)"],
6394
+ "Sukkot IV (CH''M)": ["Sukkos IV (CH’’M)"],
6395
+ "Sukkot V (CH''M)": ["Sukkos V (CH’’M)"],
6396
+ "Sukkot VI (CH''M)": ["Sukkos VI (CH’’M)"],
6359
6397
  "Sukkot VII (Hoshana Raba)": ["Sukkos VII (Hoshana Raba)"],
6360
- "Ta'anit Bechorot": ["Ta'anis Bechoros"],
6361
- "Ta'anit Esther": ["Ta'anis Esther"],
6398
+ "Ta'anit Bechorot": ["Taanis Bechoros"],
6399
+ "Ta'anit Esther": ["Taanis Esther"],
6362
6400
  "Toldot": ["Toldos"],
6363
6401
  "Vaetchanan": ["Vaeschanan"],
6364
6402
  "Yitro": ["Yisro"],
@@ -6368,7 +6406,7 @@ var poAshkenazi = {
6368
6406
  "Shabbat Mevarchim Chodesh": ["Shabbos Mevorchim Chodesh"],
6369
6407
  "Shabbat Shirah": ["Shabbos Shirah"],
6370
6408
  "Tevet": ["Teves"],
6371
- "Asara B'Tevet": ["Asara B'Teves"],
6409
+ "Asara B'Tevet": ["Asara BTeves"],
6372
6410
  "Alot HaShachar": ["Alos HaShachar"],
6373
6411
  "Kriat Shema, sof zeman": ["Krias Shema, sof zman"],
6374
6412
  "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.8 */
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
 
@@ -5855,6 +5857,26 @@ class HolidayEvent extends Event {
5855
5857
  return ['holiday', 'major'];
5856
5858
  }
5857
5859
  }
5860
+ /**
5861
+ * Returns (translated) description of this event
5862
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5863
+ * @return {string}
5864
+ */
5865
+ render(locale) {
5866
+ const str = super.render(locale);
5867
+ return str.replace(/'/g, '’');
5868
+ }
5869
+ /**
5870
+ * Returns a brief (translated) description of this event.
5871
+ * For most events, this is the same as render(). For some events, it procudes
5872
+ * a shorter text (e.g. without a time or added description).
5873
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5874
+ * @return {string}
5875
+ */
5876
+ renderBrief(locale) {
5877
+ const str = super.renderBrief(locale);
5878
+ return str.replace(/'/g, '’');
5879
+ }
5858
5880
  }
5859
5881
  const roshChodeshStr = 'Rosh Chodesh';
5860
5882
 
@@ -5875,7 +5897,9 @@ class RoshChodeshEvent extends HolidayEvent {
5875
5897
  */
5876
5898
  render(locale) {
5877
5899
  const monthName = this.getDesc().substring(roshChodeshStr.length + 1);
5878
- return Locale.gettext(roshChodeshStr, locale) + ' ' + Locale.gettext(monthName, locale);
5900
+ const monthName0 = Locale.gettext(monthName, locale);
5901
+ const monthName1 = monthName0.replace(/'/g, '’');
5902
+ return Locale.gettext(roshChodeshStr, locale) + ' ' + monthName1;
5879
5903
  }
5880
5904
  /** @return {string} */
5881
5905
  basename() {
@@ -5929,7 +5953,19 @@ class MevarchimChodeshEvent extends Event {
5929
5953
  * @return {string}
5930
5954
  */
5931
5955
  render(locale) {
5932
- return Locale.gettext(mevarchimChodeshStr, locale) + ' ' + Locale.gettext(this.monthName, locale);
5956
+ const monthName0 = Locale.gettext(this.monthName, locale);
5957
+ const monthName = monthName0.replace(/'/g, '’');
5958
+ return Locale.gettext(mevarchimChodeshStr, locale) + ' ' + monthName;
5959
+ }
5960
+ /**
5961
+ * Returns (translated) description of this event
5962
+ * @param {string} [locale] Optional locale name (defaults to active locale).
5963
+ * @return {string}
5964
+ */
5965
+ renderBrief(locale) {
5966
+ const str = this.render(locale);
5967
+ const space = str.indexOf(' ');
5968
+ return str.substring(space + 1);
5933
5969
  }
5934
5970
  }
5935
5971
 
@@ -5981,7 +6017,9 @@ class YomKippurKatanEvent extends HolidayEvent {
5981
6017
  * @return {string}
5982
6018
  */
5983
6019
  render(locale) {
5984
- return Locale.gettext(ykk, locale) + ' ' + Locale.gettext(this.nextMonthName, locale);
6020
+ const monthName0 = Locale.gettext(this.nextMonthName, locale);
6021
+ const monthName = monthName0.replace(/'/g, '’');
6022
+ return Locale.gettext(ykk, locale) + ' ' + monthName;
5985
6023
  }
5986
6024
  /**
5987
6025
  * @param {string} [locale] Optional locale name (defaults to active locale).
@@ -6271,7 +6309,7 @@ class DailyLearning {
6271
6309
  }
6272
6310
 
6273
6311
  // DO NOT EDIT THIS AUTO-GENERATED FILE!
6274
- const version = '5.0.7';
6312
+ const version = '5.0.8';
6275
6313
 
6276
6314
  const NONE$1 = 0;
6277
6315
  const HALF = 1;
@@ -6322,7 +6360,7 @@ var poAshkenazi = {
6322
6360
  "Shabbat": ["Shabbos"],
6323
6361
  "Achrei Mot": ["Achrei Mos"],
6324
6362
  "Bechukotai": ["Bechukosai"],
6325
- "Beha'alotcha": ["Beha'aloscha"],
6363
+ "Beha'alotcha": ["Behaaloscha"],
6326
6364
  "Bereshit": ["Bereshis"],
6327
6365
  "Chukat": ["Chukas"],
6328
6366
  "Erev Shavuot": ["Erev Shavuos"],
@@ -6349,14 +6387,14 @@ var poAshkenazi = {
6349
6387
  "Sukkot": ["Sukkos"],
6350
6388
  "Sukkot I": ["Sukkos I"],
6351
6389
  "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)"],
6390
+ "Sukkot II (CH''M)": ["Sukkos II (CH’’M)"],
6391
+ "Sukkot III (CH''M)": ["Sukkos III (CH’’M)"],
6392
+ "Sukkot IV (CH''M)": ["Sukkos IV (CH’’M)"],
6393
+ "Sukkot V (CH''M)": ["Sukkos V (CH’’M)"],
6394
+ "Sukkot VI (CH''M)": ["Sukkos VI (CH’’M)"],
6357
6395
  "Sukkot VII (Hoshana Raba)": ["Sukkos VII (Hoshana Raba)"],
6358
- "Ta'anit Bechorot": ["Ta'anis Bechoros"],
6359
- "Ta'anit Esther": ["Ta'anis Esther"],
6396
+ "Ta'anit Bechorot": ["Taanis Bechoros"],
6397
+ "Ta'anit Esther": ["Taanis Esther"],
6360
6398
  "Toldot": ["Toldos"],
6361
6399
  "Vaetchanan": ["Vaeschanan"],
6362
6400
  "Yitro": ["Yisro"],
@@ -6366,7 +6404,7 @@ var poAshkenazi = {
6366
6404
  "Shabbat Mevarchim Chodesh": ["Shabbos Mevorchim Chodesh"],
6367
6405
  "Shabbat Shirah": ["Shabbos Shirah"],
6368
6406
  "Tevet": ["Teves"],
6369
- "Asara B'Tevet": ["Asara B'Teves"],
6407
+ "Asara B'Tevet": ["Asara BTeves"],
6370
6408
  "Alot HaShachar": ["Alos HaShachar"],
6371
6409
  "Kriat Shema, sof zeman": ["Krias Shema, sof zman"],
6372
6410
  "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.8",
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"