@hebcal/core 5.0.6 → 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/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v5.0.6 */
1
+ /*! @hebcal/core v5.0.8 */
2
2
  var hebcal = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -1229,7 +1229,8 @@ class HDate {
1229
1229
  let showYear = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1230
1230
  const locale0 = locale || Locale.getLocaleName();
1231
1231
  const day = this.getDate();
1232
- const monthName = Locale.gettext(this.getMonthName(), locale0);
1232
+ const monthName0 = Locale.gettext(this.getMonthName(), locale0);
1233
+ const monthName = monthName0.replace(/'/g, '’');
1233
1234
  const nth = Locale.ordinal(day, locale0);
1234
1235
  const dayOf = HDate.getDayOfTranslation(locale0);
1235
1236
  const dateStr = `${nth}${dayOf} ${monthName}`;
@@ -6866,27 +6867,68 @@ class Zmanim {
6866
6867
  return this.getShaahZmanisBasedZman(4);
6867
6868
  }
6868
6869
  /**
6869
- * Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham
6870
+ * Returns an array with alot (Date) and ms in hour (number)
6871
+ * @private
6872
+ * @return {any[]}
6873
+ */
6874
+ getTemporalHour72() {
6875
+ const alot72 = this.sunriseOffset(-72, false, true);
6876
+ const tzeit72 = this.sunsetOffset(72, false, true);
6877
+ const temporalHour = (tzeit72 - alot72) / 12;
6878
+ return [alot72, temporalHour];
6879
+ }
6880
+ /**
6881
+ * Returns an array with alot (Date) and ms in hour (number)
6882
+ * @private
6883
+ * @return {any[]}
6884
+ */
6885
+ getTemporalHour16Point1() {
6886
+ const alot16one = this.alotHaShachar();
6887
+ const tzeit16one = this.tzeit(16.1);
6888
+ const temporalHour = (tzeit16one - alot16one) / 12;
6889
+ return [alot16one, temporalHour];
6890
+ }
6891
+ /**
6892
+ * Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
6893
+ * Based on the opinion of the MGA that the day is calculated from
6894
+ * dawn being fixed 72 minutes before sea-level sunrise, and nightfall is fixed
6895
+ * 72 minutes after sea-level sunset.
6870
6896
  * @return {Date}
6871
6897
  */
6872
6898
  sofZmanShmaMGA() {
6873
6899
  // Magen Avraham
6874
- const alot72 = this.sunriseOffset(-72, false, true);
6875
- const tzeit72 = this.sunsetOffset(72, false, true);
6876
- const temporalHour = (tzeit72 - alot72) / 12; // ms in hour
6900
+ const [alot72, temporalHour] = this.getTemporalHour72();
6877
6901
  return new Date(alot72.getTime() + 3 * temporalHour);
6878
6902
  }
6903
+ /**
6904
+ * Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
6905
+ * Based on the opinion of the MGA that the day is calculated from
6906
+ * dawn to nightfall with both being 16.1° below the horizon.
6907
+ * @return {Date}
6908
+ */
6909
+ sofZmanShmaMGA16Point1() {
6910
+ const [alot, temporalHour] = this.getTemporalHour16Point1();
6911
+ return new Date(alot.getTime() + 3 * temporalHour);
6912
+ }
6879
6913
  /**
6880
6914
  * Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham
6881
6915
  * @return {Date}
6882
6916
  */
6883
6917
  sofZmanTfillaMGA() {
6884
6918
  // Magen Avraham
6885
- const alot72 = this.sunriseOffset(-72, false, true);
6886
- const tzeit72 = this.sunsetOffset(72, false, true);
6887
- const temporalHour = (tzeit72 - alot72) / 12; // ms in hour
6919
+ const [alot72, temporalHour] = this.getTemporalHour72();
6888
6920
  return new Date(alot72.getTime() + 4 * temporalHour);
6889
6921
  }
6922
+ /**
6923
+ * Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
6924
+ * Based on the opinion of the MGA that the day is calculated from
6925
+ * dawn to nightfall with both being 16.1° below the horizon.
6926
+ * @return {Date}
6927
+ */
6928
+ sofZmanTfillaMGA16Point1() {
6929
+ const [alot, temporalHour] = this.getTemporalHour16Point1();
6930
+ return new Date(alot.getTime() + 4 * temporalHour);
6931
+ }
6890
6932
  /**
6891
6933
  * Earliest Mincha – Mincha Gedola; Sunrise plus 6.5 halachic hours
6892
6934
  * @return {Date}
@@ -7044,6 +7086,54 @@ class Zmanim {
7044
7086
  }
7045
7087
  }
7046
7088
 
7089
+ const hour12cc = {
7090
+ US: 1,
7091
+ CA: 1,
7092
+ BR: 1,
7093
+ AU: 1,
7094
+ NZ: 1,
7095
+ DO: 1,
7096
+ PR: 1,
7097
+ GR: 1,
7098
+ IN: 1,
7099
+ KR: 1,
7100
+ NP: 1,
7101
+ ZA: 1
7102
+ };
7103
+
7104
+ /**
7105
+ * @private
7106
+ * @param {string} timeStr - original time like "20:30"
7107
+ * @param {string} suffix - "p" or "pm" or " P.M.". Add leading space if you want it
7108
+ * @param {CalOptions} options
7109
+ * @return {string}
7110
+ */
7111
+ function reformatTimeStr(timeStr, suffix, options) {
7112
+ var _options$location;
7113
+ if (typeof timeStr !== 'string') throw new TypeError(`Bad timeStr: ${timeStr}`);
7114
+ const cc = (options === null || options === void 0 || (_options$location = options.location) === null || _options$location === void 0 ? void 0 : _options$location.cc) || (options !== null && options !== void 0 && options.il ? 'IL' : 'US');
7115
+ const hour12 = options === null || options === void 0 ? void 0 : options.hour12;
7116
+ if (typeof hour12 !== 'undefined' && !hour12) {
7117
+ return timeStr;
7118
+ }
7119
+ if (!hour12 && typeof hour12cc[cc] === 'undefined') {
7120
+ return timeStr;
7121
+ }
7122
+ const hm = timeStr.split(':');
7123
+ let hour = parseInt(hm[0], 10);
7124
+ if (hour < 12 && suffix) {
7125
+ suffix = suffix.replace('p', 'a').replace('P', 'A');
7126
+ if (hour === 0) {
7127
+ hour = 12;
7128
+ }
7129
+ } else if (hour > 12) {
7130
+ hour = hour % 12;
7131
+ } else if (hour === 0) {
7132
+ hour = '00';
7133
+ }
7134
+ return `${hour}:${hm[1]}${suffix}`;
7135
+ }
7136
+
7047
7137
  /* eslint-disable max-len */
7048
7138
  const FRI$3 = 5;
7049
7139
  const SAT$3 = 6;
@@ -7053,11 +7143,10 @@ const SAT$3 = 6;
7053
7143
  * @param {Event} e
7054
7144
  * @param {HDate} hd
7055
7145
  * @param {number} dow
7056
- * @param {Location} location
7057
7146
  * @param {CalOptions} options
7058
7147
  * @return {Event}
7059
7148
  */
7060
- function makeCandleEvent(e, hd, dow, location, options) {
7149
+ function makeCandleEvent(e, hd, dow, options) {
7061
7150
  let havdalahTitle = false;
7062
7151
  let useHavdalahOffset = dow === SAT$3;
7063
7152
  let mask = e ? e.getFlags() : flags.LIGHT_CANDLES;
@@ -7077,15 +7166,16 @@ function makeCandleEvent(e, hd, dow, location, options) {
7077
7166
  }
7078
7167
  // if offset is 0 or undefined, we'll use tzeit time
7079
7168
  const offset = useHavdalahOffset ? options.havdalahMins : options.candleLightingMins;
7169
+ const location = options.location;
7080
7170
  const zmanim = new Zmanim(location, hd, options.useElevation);
7081
7171
  const time = offset ? zmanim.sunsetOffset(offset, true) : zmanim.tzeit(options.havdalahDeg);
7082
7172
  if (isNaN(time.getTime())) {
7083
7173
  return null; // no sunset
7084
7174
  }
7085
7175
  if (havdalahTitle) {
7086
- return new HavdalahEvent(hd, mask, time, location, options.havdalahMins, e);
7176
+ return new HavdalahEvent(hd, mask, time, location, options.havdalahMins, e, options);
7087
7177
  } else {
7088
- return new CandleLightingEvent(hd, mask, time, location, e);
7178
+ return new CandleLightingEvent(hd, mask, time, location, e, options);
7089
7179
  }
7090
7180
  }
7091
7181
 
@@ -7098,13 +7188,18 @@ class TimedEvent extends Event {
7098
7188
  * @param {Date} eventTime
7099
7189
  * @param {Location} location
7100
7190
  * @param {Event} linkedEvent
7191
+ * @param {CalOptions} options
7101
7192
  */
7102
- constructor(date, desc, mask, eventTime, location, linkedEvent) {
7193
+ constructor(date, desc, mask, eventTime, location, linkedEvent, options) {
7103
7194
  super(date, desc, mask);
7104
7195
  this.eventTime = Zmanim.roundTime(eventTime);
7105
7196
  this.location = location;
7106
7197
  const timeFormat = location.getTimeFormatter();
7107
7198
  this.eventTimeStr = Zmanim.formatTime(this.eventTime, timeFormat);
7199
+ const opts = Object.assign({
7200
+ location
7201
+ }, options);
7202
+ this.fmtTime = reformatTimeStr(this.eventTimeStr, 'pm', opts);
7108
7203
  if (typeof linkedEvent !== 'undefined') {
7109
7204
  this.linkedEvent = linkedEvent;
7110
7205
  }
@@ -7114,7 +7209,7 @@ class TimedEvent extends Event {
7114
7209
  * @return {string}
7115
7210
  */
7116
7211
  render(locale) {
7117
- return Locale.gettext(this.getDesc(), locale) + ': ' + this.eventTimeStr;
7212
+ return Locale.gettext(this.getDesc(), locale) + ': ' + this.fmtTime;
7118
7213
  }
7119
7214
  /**
7120
7215
  * Returns translation of "Candle lighting" without the time.
@@ -7151,9 +7246,10 @@ class HavdalahEvent extends TimedEvent {
7151
7246
  * @param {Location} location
7152
7247
  * @param {number} havdalahMins
7153
7248
  * @param {Event} linkedEvent
7249
+ * @param {CalOptions} options
7154
7250
  */
7155
- constructor(date, mask, eventTime, location, havdalahMins, linkedEvent) {
7156
- super(date, 'Havdalah', mask, eventTime, location, linkedEvent);
7251
+ constructor(date, mask, eventTime, location, havdalahMins, linkedEvent, options) {
7252
+ super(date, 'Havdalah', mask, eventTime, location, linkedEvent, options);
7157
7253
  if (havdalahMins) {
7158
7254
  this.havdalahMins = havdalahMins;
7159
7255
  }
@@ -7163,7 +7259,7 @@ class HavdalahEvent extends TimedEvent {
7163
7259
  * @return {string}
7164
7260
  */
7165
7261
  render(locale) {
7166
- return this.renderBrief(locale) + ': ' + this.eventTimeStr;
7262
+ return this.renderBrief(locale) + ': ' + this.fmtTime;
7167
7263
  }
7168
7264
  /**
7169
7265
  * Returns translation of "Havdalah" without the time.
@@ -7192,9 +7288,10 @@ class CandleLightingEvent extends TimedEvent {
7192
7288
  * @param {Date} eventTime
7193
7289
  * @param {Location} location
7194
7290
  * @param {Event} linkedEvent
7291
+ * @param {CalOptions} options
7195
7292
  */
7196
- constructor(date, mask, eventTime, location, linkedEvent) {
7197
- super(date, 'Candle lighting', mask, eventTime, location, linkedEvent);
7293
+ constructor(date, mask, eventTime, location, linkedEvent, options) {
7294
+ super(date, 'Candle lighting', mask, eventTime, location, linkedEvent, options);
7198
7295
  }
7199
7296
  /** @return {string} */
7200
7297
  getEmoji() {
@@ -7222,14 +7319,14 @@ function makeFastStartEnd(ev, options) {
7222
7319
  const zmanim = new Zmanim(location, dt, options.useElevation);
7223
7320
  if (desc === 'Erev Tish\'a B\'Av') {
7224
7321
  const sunset = zmanim.sunset();
7225
- ev.startEvent = makeTimedEvent(hd, sunset, 'Fast begins', ev, location);
7322
+ ev.startEvent = makeTimedEvent(hd, sunset, 'Fast begins', ev, options);
7226
7323
  } else if (desc.startsWith('Tish\'a B\'Av')) {
7227
- ev.endEvent = makeTimedEvent(hd, zmanim.tzeit(fastEndDeg), 'Fast ends', ev, location);
7324
+ ev.endEvent = makeTimedEvent(hd, zmanim.tzeit(fastEndDeg), 'Fast ends', ev, options);
7228
7325
  } else {
7229
7326
  const dawn = zmanim.alotHaShachar();
7230
- ev.startEvent = makeTimedEvent(hd, dawn, 'Fast begins', ev, location);
7327
+ ev.startEvent = makeTimedEvent(hd, dawn, 'Fast begins', ev, options);
7231
7328
  if (dt.getDay() !== 5 && !(hd.getDate() === 14 && hd.getMonth() === months.NISAN)) {
7232
- ev.endEvent = makeTimedEvent(hd, zmanim.tzeit(fastEndDeg), 'Fast ends', ev, location);
7329
+ ev.endEvent = makeTimedEvent(hd, zmanim.tzeit(fastEndDeg), 'Fast ends', ev, options);
7233
7330
  }
7234
7331
  }
7235
7332
  return ev;
@@ -7241,14 +7338,15 @@ function makeFastStartEnd(ev, options) {
7241
7338
  * @param {Date} time
7242
7339
  * @param {string} desc
7243
7340
  * @param {Event} ev
7244
- * @param {Location} location
7341
+ * @param {CalOptions} options
7245
7342
  * @return {TimedEvent}
7246
7343
  */
7247
- function makeTimedEvent(hd, time, desc, ev, location) {
7344
+ function makeTimedEvent(hd, time, desc, ev, options) {
7248
7345
  if (isNaN(time.getTime())) {
7249
7346
  return null;
7250
7347
  }
7251
- return new TimedEvent(hd, desc, ev.getFlags(), time, location, ev);
7348
+ const location = options.location;
7349
+ return new TimedEvent(hd, desc, ev.getFlags(), time, location, ev, options);
7252
7350
  }
7253
7351
 
7254
7352
  /**
@@ -7264,7 +7362,7 @@ function makeWeekdayChanukahCandleLighting(ev, hd, options) {
7264
7362
  const zmanim = new Zmanim(location, hd.greg(), options.useElevation);
7265
7363
  const candleLightingTime = zmanim.dusk();
7266
7364
  // const candleLightingTime = zmanim.tzeit(4.6667);
7267
- return makeTimedEvent(hd, candleLightingTime, ev.getDesc(), ev, location);
7365
+ return makeTimedEvent(hd, candleLightingTime, ev.getDesc(), ev, options);
7268
7366
  }
7269
7367
 
7270
7368
  /* eslint-disable camelcase */
@@ -7352,6 +7450,34 @@ class Molad {
7352
7450
  getChalakim() {
7353
7451
  return this.chalakim;
7354
7452
  }
7453
+ /**
7454
+ * @param {string} [locale] Optional locale name (defaults to active locale)
7455
+ * @param {CalOptions} options
7456
+ * @return {string}
7457
+ */
7458
+ render(locale, options) {
7459
+ locale = locale || Locale.getLocaleName();
7460
+ if (typeof locale === 'string') {
7461
+ locale = locale.toLowerCase();
7462
+ }
7463
+ const isHebrewLocale = locale === 'he' || locale === 'he-x-nonikud' || locale === 'h';
7464
+ const monthName = Locale.gettext(this.getMonthName(), locale);
7465
+ const dayNames = isHebrewLocale ? heDayNames : shortDayNames;
7466
+ const dow = dayNames[this.getDow()];
7467
+ const minutes = this.getMinutes();
7468
+ const hour = this.getHour();
7469
+ const chalakim = this.getChalakim();
7470
+ const moladStr = Locale.gettext('Molad', locale);
7471
+ const minutesStr = Locale.lookupTranslation('min', locale) || 'minutes';
7472
+ const chalakimStr = Locale.gettext('chalakim', locale);
7473
+ if (isHebrewLocale) {
7474
+ const ampm = hour < 5 ? night : hour < 12 ? morning : hour < 17 ? afternoon : hour < 21 ? evening : night;
7475
+ return `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` + `בְּשָׁעָה ${hour} ${ampm}, ` + `ו-${minutes} ${minutesStr} ` + `ו-${chalakim} ${chalakimStr}`;
7476
+ }
7477
+ const fmtTime = reformatTimeStr(`${hour}:00`, 'pm', options);
7478
+ const month = monthName.replace(/'/g, '’');
7479
+ return `${moladStr} ${month}: ${dow}, ${minutes} ${minutesStr} and ${chalakim} ${chalakimStr} after ${fmtTime}`;
7480
+ }
7355
7481
  }
7356
7482
 
7357
7483
  /** Represents a Molad announcement on Shabbat Mevarchim */
@@ -7360,38 +7486,21 @@ class MoladEvent extends Event {
7360
7486
  * @param {HDate} date Hebrew date event occurs
7361
7487
  * @param {number} hyear molad year
7362
7488
  * @param {number} hmonth molad month
7489
+ * @param {CalOptions} options
7363
7490
  */
7364
- constructor(date, hyear, hmonth) {
7491
+ constructor(date, hyear, hmonth, options) {
7365
7492
  const m = new Molad(hyear, hmonth);
7366
7493
  const monthName = m.getMonthName();
7367
7494
  super(date, `Molad ${monthName} ${hyear}`, flags.MOLAD);
7368
7495
  this.molad = m;
7496
+ this.options = options;
7369
7497
  }
7370
7498
  /**
7371
7499
  * @param {string} [locale] Optional locale name (defaults to active locale).
7372
7500
  * @return {string}
7373
7501
  */
7374
7502
  render(locale) {
7375
- const m = this.molad;
7376
- locale = locale || Locale.getLocaleName();
7377
- if (typeof locale === 'string') {
7378
- locale = locale.toLowerCase();
7379
- }
7380
- const isHebrewLocale = locale === 'he' || locale === 'he-x-nonikud' || locale === 'h';
7381
- const monthName = Locale.gettext(m.getMonthName(), locale);
7382
- const dayNames = isHebrewLocale ? heDayNames : shortDayNames;
7383
- const dow = dayNames[m.getDow()];
7384
- const minutes = m.getMinutes();
7385
- const hour = m.getHour();
7386
- const chalakim = m.getChalakim();
7387
- const moladStr = Locale.gettext('Molad', locale);
7388
- const minutesStr = Locale.lookupTranslation('min', locale) || 'minutes';
7389
- const chalakimStr = Locale.gettext('chalakim', locale);
7390
- if (isHebrewLocale) {
7391
- const ampm = hour < 5 ? night : hour < 12 ? morning : hour < 17 ? afternoon : hour < 21 ? evening : night;
7392
- return `${moladStr} ${monthName} יִהְיֶה בַּיּוֹם ${dow} בשָׁבוּעַ, ` + `בְּשָׁעָה ${hour} ${ampm}, ` + `ו-${minutes} ${minutesStr} ` + `ו-${chalakim} ${chalakimStr}`;
7393
- }
7394
- return `${moladStr} ${monthName}: ${dow}, ${minutes} ${minutesStr} and ${chalakim} ${chalakimStr} after ${hour}:00`;
7503
+ return this.molad.render(locale, this.options);
7395
7504
  }
7396
7505
  }
7397
7506
 
@@ -8375,25 +8484,14 @@ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
8375
8484
  };
8376
8485
  };
8377
8486
 
8378
- var documentAll$2 = typeof document == 'object' && document.all;
8379
-
8380
8487
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
8381
- // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
8382
- var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
8383
-
8384
- var documentAll_1 = {
8385
- all: documentAll$2,
8386
- IS_HTMLDDA: IS_HTMLDDA
8387
- };
8388
-
8389
- var $documentAll$1 = documentAll_1;
8390
-
8391
- var documentAll$1 = $documentAll$1.all;
8488
+ var documentAll = typeof document == 'object' && document.all;
8392
8489
 
8393
8490
  // `IsCallable` abstract operation
8394
8491
  // https://tc39.es/ecma262/#sec-iscallable
8395
- var isCallable$a = $documentAll$1.IS_HTMLDDA ? function (argument) {
8396
- return typeof argument == 'function' || argument === documentAll$1;
8492
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
8493
+ var isCallable$a = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
8494
+ return typeof argument == 'function' || argument === documentAll;
8397
8495
  } : function (argument) {
8398
8496
  return typeof argument == 'function';
8399
8497
  };
@@ -8499,13 +8597,8 @@ var WeakMap$2 = global$9.WeakMap;
8499
8597
  var weakMapBasicDetection = isCallable$8(WeakMap$2) && /native code/.test(String(WeakMap$2));
8500
8598
 
8501
8599
  var isCallable$7 = isCallable$a;
8502
- var $documentAll = documentAll_1;
8503
8600
 
8504
- var documentAll = $documentAll.all;
8505
-
8506
- var isObject$5 = $documentAll.IS_HTMLDDA ? function (it) {
8507
- return typeof it == 'object' ? it !== null : isCallable$7(it) || it === documentAll;
8508
- } : function (it) {
8601
+ var isObject$5 = function (it) {
8509
8602
  return typeof it == 'object' ? it !== null : isCallable$7(it);
8510
8603
  };
8511
8604
 
@@ -8705,10 +8798,10 @@ var store$1 = sharedStore;
8705
8798
  (shared$3.exports = function (key, value) {
8706
8799
  return store$1[key] || (store$1[key] = value !== undefined ? value : {});
8707
8800
  })('versions', []).push({
8708
- version: '3.34.0',
8801
+ version: '3.35.0',
8709
8802
  mode: 'global',
8710
8803
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
8711
- license: 'https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE',
8804
+ license: 'https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE',
8712
8805
  source: 'https://github.com/zloirock/core-js'
8713
8806
  });
8714
8807
 
@@ -9600,6 +9693,26 @@ class HolidayEvent extends Event {
9600
9693
  return ['holiday', 'major'];
9601
9694
  }
9602
9695
  }
9696
+ /**
9697
+ * Returns (translated) description of this event
9698
+ * @param {string} [locale] Optional locale name (defaults to active locale).
9699
+ * @return {string}
9700
+ */
9701
+ render(locale) {
9702
+ const str = super.render(locale);
9703
+ return str.replace(/'/g, '’');
9704
+ }
9705
+ /**
9706
+ * Returns a brief (translated) description of this event.
9707
+ * For most events, this is the same as render(). For some events, it procudes
9708
+ * a shorter text (e.g. without a time or added description).
9709
+ * @param {string} [locale] Optional locale name (defaults to active locale).
9710
+ * @return {string}
9711
+ */
9712
+ renderBrief(locale) {
9713
+ const str = super.renderBrief(locale);
9714
+ return str.replace(/'/g, '’');
9715
+ }
9603
9716
  }
9604
9717
  const roshChodeshStr = 'Rosh Chodesh';
9605
9718
 
@@ -9620,7 +9733,9 @@ class RoshChodeshEvent extends HolidayEvent {
9620
9733
  */
9621
9734
  render(locale) {
9622
9735
  const monthName = this.getDesc().substring(roshChodeshStr.length + 1);
9623
- return Locale.gettext(roshChodeshStr, locale) + ' ' + Locale.gettext(monthName, locale);
9736
+ const monthName0 = Locale.gettext(monthName, locale);
9737
+ const monthName1 = monthName0.replace(/'/g, '’');
9738
+ return Locale.gettext(roshChodeshStr, locale) + ' ' + monthName1;
9624
9739
  }
9625
9740
  /** @return {string} */
9626
9741
  basename() {
@@ -9659,8 +9774,10 @@ class MevarchimChodeshEvent extends Event {
9659
9774
  const hyear = date.getFullYear();
9660
9775
  const hmonth = date.getMonth();
9661
9776
  const monNext = hmonth == HDate.monthsInYear(hyear) ? NISAN$1 : hmonth + 1;
9662
- const molad = new MoladEvent(date, hyear, monNext);
9663
- this.memo = molad.render('en');
9777
+ const molad = new Molad(hyear, monNext);
9778
+ this.memo = molad.render('en', {
9779
+ hour12: false
9780
+ });
9664
9781
  }
9665
9782
  /** @return {string} */
9666
9783
  basename() {
@@ -9672,7 +9789,19 @@ class MevarchimChodeshEvent extends Event {
9672
9789
  * @return {string}
9673
9790
  */
9674
9791
  render(locale) {
9675
- return Locale.gettext(mevarchimChodeshStr, locale) + ' ' + Locale.gettext(this.monthName, locale);
9792
+ const monthName0 = Locale.gettext(this.monthName, locale);
9793
+ const monthName = monthName0.replace(/'/g, '’');
9794
+ return Locale.gettext(mevarchimChodeshStr, locale) + ' ' + monthName;
9795
+ }
9796
+ /**
9797
+ * Returns (translated) description of this event
9798
+ * @param {string} [locale] Optional locale name (defaults to active locale).
9799
+ * @return {string}
9800
+ */
9801
+ renderBrief(locale) {
9802
+ const str = this.render(locale);
9803
+ const space = str.indexOf(' ');
9804
+ return str.substring(space + 1);
9676
9805
  }
9677
9806
  }
9678
9807
 
@@ -9724,7 +9853,9 @@ class YomKippurKatanEvent extends HolidayEvent {
9724
9853
  * @return {string}
9725
9854
  */
9726
9855
  render(locale) {
9727
- return Locale.gettext(ykk, locale) + ' ' + Locale.gettext(this.nextMonthName, locale);
9856
+ const monthName0 = Locale.gettext(this.nextMonthName, locale);
9857
+ const monthName = monthName0.replace(/'/g, '’');
9858
+ return Locale.gettext(ykk, locale) + ' ' + monthName;
9728
9859
  }
9729
9860
  /**
9730
9861
  * @param {string} [locale] Optional locale name (defaults to active locale).
@@ -10017,7 +10148,7 @@ class DailyLearning {
10017
10148
  }
10018
10149
 
10019
10150
  // DO NOT EDIT THIS AUTO-GENERATED FILE!
10020
- const version = '5.0.6';
10151
+ const version = '5.0.8';
10021
10152
 
10022
10153
  var objectGetOwnPropertyDescriptor = {};
10023
10154
 
@@ -10580,7 +10711,7 @@ var poAshkenazi = {
10580
10711
  "Shabbat": ["Shabbos"],
10581
10712
  "Achrei Mot": ["Achrei Mos"],
10582
10713
  "Bechukotai": ["Bechukosai"],
10583
- "Beha'alotcha": ["Beha'aloscha"],
10714
+ "Beha'alotcha": ["Behaaloscha"],
10584
10715
  "Bereshit": ["Bereshis"],
10585
10716
  "Chukat": ["Chukas"],
10586
10717
  "Erev Shavuot": ["Erev Shavuos"],
@@ -10607,14 +10738,14 @@ var poAshkenazi = {
10607
10738
  "Sukkot": ["Sukkos"],
10608
10739
  "Sukkot I": ["Sukkos I"],
10609
10740
  "Sukkot II": ["Sukkos II"],
10610
- "Sukkot II (CH''M)": ["Sukkos II (CH''M)"],
10611
- "Sukkot III (CH''M)": ["Sukkos III (CH''M)"],
10612
- "Sukkot IV (CH''M)": ["Sukkos IV (CH''M)"],
10613
- "Sukkot V (CH''M)": ["Sukkos V (CH''M)"],
10614
- "Sukkot VI (CH''M)": ["Sukkos VI (CH''M)"],
10741
+ "Sukkot II (CH''M)": ["Sukkos II (CH’’M)"],
10742
+ "Sukkot III (CH''M)": ["Sukkos III (CH’’M)"],
10743
+ "Sukkot IV (CH''M)": ["Sukkos IV (CH’’M)"],
10744
+ "Sukkot V (CH''M)": ["Sukkos V (CH’’M)"],
10745
+ "Sukkot VI (CH''M)": ["Sukkos VI (CH’’M)"],
10615
10746
  "Sukkot VII (Hoshana Raba)": ["Sukkos VII (Hoshana Raba)"],
10616
- "Ta'anit Bechorot": ["Ta'anis Bechoros"],
10617
- "Ta'anit Esther": ["Ta'anis Esther"],
10747
+ "Ta'anit Bechorot": ["Taanis Bechoros"],
10748
+ "Ta'anit Esther": ["Taanis Esther"],
10618
10749
  "Toldot": ["Toldos"],
10619
10750
  "Vaetchanan": ["Vaeschanan"],
10620
10751
  "Yitro": ["Yisro"],
@@ -10624,7 +10755,7 @@ var poAshkenazi = {
10624
10755
  "Shabbat Mevarchim Chodesh": ["Shabbos Mevorchim Chodesh"],
10625
10756
  "Shabbat Shirah": ["Shabbos Shirah"],
10626
10757
  "Tevet": ["Teves"],
10627
- "Asara B'Tevet": ["Asara B'Teves"],
10758
+ "Asara B'Tevet": ["Asara BTeves"],
10628
10759
  "Alot HaShachar": ["Alos HaShachar"],
10629
10760
  "Kriat Shema, sof zeman": ["Krias Shema, sof zman"],
10630
10761
  "Tefilah, sof zeman": ["Tefilah, sof zman"],
@@ -11483,20 +11614,6 @@ function getMaskFromOptions(options) {
11483
11614
  }
11484
11615
  const MASK_LIGHT_CANDLES = LIGHT_CANDLES | LIGHT_CANDLES_TZEIS | CHANUKAH_CANDLES | YOM_TOV_ENDS;
11485
11616
  const defaultLocation = new Location(0, 0, false, 'UTC');
11486
- const hour12cc = {
11487
- US: 1,
11488
- CA: 1,
11489
- BR: 1,
11490
- AU: 1,
11491
- NZ: 1,
11492
- DO: 1,
11493
- PR: 1,
11494
- GR: 1,
11495
- IN: 1,
11496
- KR: 1,
11497
- NP: 1,
11498
- ZA: 1
11499
- };
11500
11617
 
11501
11618
  /**
11502
11619
  * @private
@@ -11752,10 +11869,10 @@ class HebrewCalendar {
11752
11869
  const hmonth = hd.getMonth();
11753
11870
  if (options.molad && dow == SAT && hmonth != ELUL && hd.getDate() >= 23 && hd.getDate() <= 29) {
11754
11871
  const monNext = hmonth == HDate.monthsInYear(hyear) ? NISAN : hmonth + 1;
11755
- evts.push(new MoladEvent(hd, hyear, monNext));
11872
+ evts.push(new MoladEvent(hd, hyear, monNext, options));
11756
11873
  }
11757
11874
  if (!candlesEv && options.candlelighting && (dow == FRI || dow == SAT)) {
11758
- candlesEv = makeCandleEvent(undefined, hd, dow, location, options);
11875
+ candlesEv = makeCandleEvent(undefined, hd, dow, options);
11759
11876
  if (dow === FRI && candlesEv && sedra) {
11760
11877
  candlesEv.memo = sedra.getString(abs);
11761
11878
  }
@@ -11922,28 +12039,7 @@ class HebrewCalendar {
11922
12039
  * @return {string}
11923
12040
  */
11924
12041
  static reformatTimeStr(timeStr, suffix, options) {
11925
- var _options$location2;
11926
- if (typeof timeStr !== 'string') throw new TypeError(`Bad timeStr: ${timeStr}`);
11927
- const cc = ((_options$location2 = options.location) === null || _options$location2 === void 0 ? void 0 : _options$location2.cc) || (options.il ? 'IL' : 'US');
11928
- if (typeof options.hour12 !== 'undefined' && !options.hour12) {
11929
- return timeStr;
11930
- }
11931
- if (!options.hour12 && typeof hour12cc[cc] === 'undefined') {
11932
- return timeStr;
11933
- }
11934
- const hm = timeStr.split(':');
11935
- let hour = parseInt(hm[0], 10);
11936
- if (hour < 12 && suffix) {
11937
- suffix = suffix.replace('p', 'a').replace('P', 'A');
11938
- if (hour === 0) {
11939
- hour = 12;
11940
- }
11941
- } else if (hour > 12) {
11942
- hour = hour % 12;
11943
- } else if (hour === 0) {
11944
- hour = '00';
11945
- }
11946
- return `${hour}:${hm[1]}${suffix}`;
12042
+ return reformatTimeStr(timeStr, suffix, options);
11947
12043
  }
11948
12044
 
11949
12045
  /** @return {string} */
@@ -12042,7 +12138,7 @@ function appendHolidayAndRelated(events, ev, options, candlesEv, dow) {
12042
12138
  if (eFlags & options.mask || !eFlags && !options.userMask) {
12043
12139
  if (options.candlelighting && eFlags & MASK_LIGHT_CANDLES) {
12044
12140
  const hd = ev.getDate();
12045
- candlesEv = makeCandleEvent(ev, hd, dow, location, options);
12141
+ candlesEv = makeCandleEvent(ev, hd, dow, options);
12046
12142
  if (eFlags & CHANUKAH_CANDLES && candlesEv && !options.noHolidays) {
12047
12143
  const chanukahEv = dow === FRI || dow === SAT ? candlesEv : makeWeekdayChanukahCandleLighting(ev, hd, options);
12048
12144
  const attrs = {