@hebcal/core 6.10.0 → 6.11.0
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/README.md +13 -5
- package/dist/bundle.js +88 -16
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +13 -13
- package/dist/bundle.min.js.map +1 -1
- package/dist/esm/CalOptions.d.ts +35 -2
- package/dist/esm/DailyLearning.js +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.js +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +1 -1
- package/dist/esm/TimedEvent.js +1 -1
- package/dist/esm/YomKippurKatanEvent.js +1 -1
- package/dist/esm/ashkenazi.po.js +1 -1
- package/dist/esm/calendar.d.ts +11 -3
- package/dist/esm/calendar.js +36 -4
- package/dist/esm/calendar.js.map +1 -1
- package/dist/esm/candles.d.ts +8 -5
- package/dist/esm/candles.js +52 -12
- package/dist/esm/candles.js.map +1 -1
- package/dist/esm/cities.json.js +1 -1
- package/dist/esm/event.js +1 -1
- package/dist/esm/getStartAndEnd.js +1 -1
- package/dist/esm/hallel.js +1 -1
- package/dist/esm/he-x-NoNikud.po.js +1 -1
- package/dist/esm/he.po.js +1 -1
- package/dist/esm/hebcal.js +1 -1
- package/dist/esm/holidays.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/isAssurBemlacha.js +1 -1
- package/dist/esm/isAveilut.js +1 -1
- package/dist/esm/isFastDay.js +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.js +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.js +1 -1
- package/dist/esm/moladBase.js +1 -1
- package/dist/esm/moladDate.js +1 -1
- package/dist/esm/omer.js +1 -1
- package/dist/esm/parshaName.js +1 -1
- package/dist/esm/parshaYear.js +1 -1
- package/dist/esm/pkgVersion.d.ts +1 -1
- package/dist/esm/pkgVersion.js +2 -2
- package/dist/esm/pkgVersion.js.map +1 -1
- package/dist/esm/reformatTimeStr.js +1 -1
- package/dist/esm/sedra.js +1 -1
- package/dist/esm/sefira.json.js +1 -1
- package/dist/esm/staticHolidays.js +1 -1
- package/dist/esm/string.js +1 -1
- package/dist/esm/tachanun.js +1 -1
- package/dist/esm/zmanim.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -216,13 +216,21 @@ visible — calculated at 8.5° of solar depression. Two mutually exclusive over
|
|
|
216
216
|
|
|
217
217
|
**Minor fasts** begin at Alot HaShachar (16.1° in the morning). They end at 7.083°
|
|
218
218
|
in the Diaspora, or 15 minutes after sunset in Israel (Rabbi Deblitzky's practice).
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
Each end has a pair of mutually exclusive overrides:
|
|
220
|
+
|
|
221
|
+
- `options.fastStartDeg` — a different solar depression angle for the start, or
|
|
222
|
+
`options.fastStartMins` — a fixed number of minutes before sunrise (72 and 90
|
|
223
|
+
are typical).
|
|
224
|
+
- `options.fastEndDeg` — a different solar depression angle for the end, or
|
|
225
|
+
`options.fastEndMins` — a fixed number of minutes after sunset.
|
|
226
|
+
|
|
227
|
+
When a minor fast falls on a Friday, the end time is suppressed, because
|
|
221
228
|
Shabbat begins before nightfall.
|
|
222
229
|
|
|
223
|
-
**Tish'a B'Av** does not follow those rules: it begins at sunset the
|
|
224
|
-
|
|
225
|
-
`
|
|
230
|
+
**Tish'a B'Av** does not follow those rules: it always begins at sunset the
|
|
231
|
+
previous day, and by default ends at 6.45° (Rabbi Yechiel Michel Tucazinsky),
|
|
232
|
+
ignoring the minor fast options. Override its end with `options.tishaBavEndDeg` or
|
|
233
|
+
`options.tishaBavEndMins` (mutually exclusive).
|
|
226
234
|
|
|
227
235
|
**Chanukah** candle-lighting, also generated when `candlelighting` and `location`
|
|
228
236
|
are set, is at Bein HaShmashos (13.5 minutes before 7.083°) on weekdays, regular
|
package/dist/bundle.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @hebcal/core v6.
|
|
1
|
+
/*! @hebcal/core v6.11.0, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
2
2
|
var hebcal = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
/** DO NOT EDIT THIS AUTO-GENERATED FILE! */
|
|
6
|
-
const version = '6.
|
|
6
|
+
const version = '6.11.0';
|
|
7
7
|
|
|
8
8
|
/*! @hebcal/hdate v0.22.8, distributed under GPLv2 https://www.gnu.org/licenses/gpl-2.0.txt */
|
|
9
9
|
/** @private */
|
|
@@ -13207,11 +13207,43 @@ const TZEIT_3MEDIUM_STARS = 7.0833333;
|
|
|
13207
13207
|
* @private
|
|
13208
13208
|
*/
|
|
13209
13209
|
const MINOR_FAST_END_MINUTES_IL = 15;
|
|
13210
|
+
/**
|
|
13211
|
+
* Alot HaShachar, 16.1° below geometric zenith.
|
|
13212
|
+
* Default start time for minor fasts.
|
|
13213
|
+
* @private
|
|
13214
|
+
*/
|
|
13215
|
+
const ALOT_16_POINT_1 = 16.1;
|
|
13216
|
+
/**
|
|
13217
|
+
* Returns `val` when it is a finite nonzero number, otherwise `undefined`
|
|
13218
|
+
* @private
|
|
13219
|
+
*/
|
|
13220
|
+
function nonzero(val) {
|
|
13221
|
+
return typeof val === 'number' && isFinite(val) && val !== 0 ? val : undefined;
|
|
13222
|
+
}
|
|
13223
|
+
/**
|
|
13224
|
+
* Computes the "Fast begins" time for a minor fast (one that begins at dawn).
|
|
13225
|
+
*
|
|
13226
|
+
* When `options.fastStartMins` is a nonzero number, the fast begins that many
|
|
13227
|
+
* minutes before sunrise; otherwise, when `options.fastStartDeg` is a nonzero
|
|
13228
|
+
* number, the fast begins when the sun is that many degrees below the horizon
|
|
13229
|
+
* in the morning. By default, minor fasts begin at Alot HaShachar (16.1°).
|
|
13230
|
+
* @private
|
|
13231
|
+
*/
|
|
13232
|
+
function makeFastStartTime(zmanim, options) {
|
|
13233
|
+
const fastStartMins = nonzero(options.fastStartMins);
|
|
13234
|
+
if (fastStartMins !== undefined) {
|
|
13235
|
+
return zmanim.sunriseOffset(-Math.abs(fastStartMins), true);
|
|
13236
|
+
}
|
|
13237
|
+
const fastStartDeg = nonzero(options.fastStartDeg);
|
|
13238
|
+
return zmanim.timeAtAngle(fastStartDeg === undefined ? ALOT_16_POINT_1 : Math.abs(fastStartDeg), true);
|
|
13239
|
+
}
|
|
13210
13240
|
/**
|
|
13211
13241
|
* Computes the "Fast ends" time for a fast day.
|
|
13212
13242
|
*
|
|
13213
|
-
* Tish'a B'Av
|
|
13214
|
-
*
|
|
13243
|
+
* Tish'a B'Av ends `options.tishaBavEndMins` minutes after sunset or at tzeit
|
|
13244
|
+
* `options.tishaBavEndDeg` when either is a nonzero number, and otherwise at
|
|
13245
|
+
* tzeit 6.45° (Rabbi Yechiel Michel Tucazinsky). It is not affected by
|
|
13246
|
+
* `options.fastEndDeg`, `options.fastEndMins` or `options.il`.
|
|
13215
13247
|
*
|
|
13216
13248
|
* For minor fasts: when `options.fastEndMins` is a nonzero number, the fast
|
|
13217
13249
|
* ends that many minutes after sunset; otherwise, when `options.fastEndDeg` is
|
|
@@ -13223,7 +13255,12 @@ const MINOR_FAST_END_MINUTES_IL = 15;
|
|
|
13223
13255
|
*/
|
|
13224
13256
|
function makeFastEndTime(zmanim, isTishaBav, options) {
|
|
13225
13257
|
if (isTishaBav) {
|
|
13226
|
-
|
|
13258
|
+
const tishaBavEndMins = nonzero(options.tishaBavEndMins);
|
|
13259
|
+
if (tishaBavEndMins !== undefined) {
|
|
13260
|
+
return zmanim.sunsetOffset(Math.abs(tishaBavEndMins), true);
|
|
13261
|
+
}
|
|
13262
|
+
const tishaBavEndDeg = nonzero(options.tishaBavEndDeg);
|
|
13263
|
+
return zmanim.tzeit(tishaBavEndDeg === undefined ? TZEIT_TUCAZINSKY : Math.abs(tishaBavEndDeg));
|
|
13227
13264
|
}
|
|
13228
13265
|
const fastEndMins = options.fastEndMins;
|
|
13229
13266
|
if (typeof fastEndMins === 'number' && fastEndMins !== 0) {
|
|
@@ -13247,13 +13284,16 @@ function makeFastEndTime(zmanim, isTishaBav, options) {
|
|
|
13247
13284
|
* `options.candlelighting` is `true` and `options.location` is provided.
|
|
13248
13285
|
*
|
|
13249
13286
|
* - Minor fasts (including Yom Kippur Katan) begin at *Alot HaShachar*
|
|
13250
|
-
* (16.1° below horizon in the morning)
|
|
13251
|
-
*
|
|
13287
|
+
* (16.1° below horizon in the morning), which can be overridden via
|
|
13288
|
+
* `options.fastStartDeg` or `options.fastStartMins`. By default they end at
|
|
13289
|
+
* tzeit 7.083° (3 medium-sized stars) in the Diaspora, or 15 minutes after
|
|
13252
13290
|
* sunset in Israel (Rabbi Deblitzky's practice). This can be overridden
|
|
13253
13291
|
* via `options.fastEndDeg` or `options.fastEndMins`.
|
|
13254
|
-
* - Tish'a B'Av begins at sunset on the previous day
|
|
13255
|
-
*
|
|
13256
|
-
*
|
|
13292
|
+
* - Tish'a B'Av begins at sunset on the previous day, regardless of
|
|
13293
|
+
* `options.fastStartDeg` / `options.fastStartMins`. By default it ends at
|
|
13294
|
+
* tzeit 6.45° below horizon (Rabbi Yechiel Michel Tucazinsky), which can be
|
|
13295
|
+
* overridden via `options.tishaBavEndDeg` or `options.tishaBavEndMins`
|
|
13296
|
+
* (but not by `options.fastEndDeg` / `options.fastEndMins`).
|
|
13257
13297
|
* - When a minor fast falls on a Friday, the end time is suppressed
|
|
13258
13298
|
* (Shabbat begins before nightfall).
|
|
13259
13299
|
*/
|
|
@@ -13312,9 +13352,9 @@ function makeFastStartEnd(ev, options) {
|
|
|
13312
13352
|
}
|
|
13313
13353
|
}
|
|
13314
13354
|
else {
|
|
13315
|
-
const
|
|
13316
|
-
if (!isNaN(
|
|
13317
|
-
startEvent = makeTimedEvent(ev,
|
|
13355
|
+
const fastStart = makeFastStartTime(zmanim, options);
|
|
13356
|
+
if (!isNaN(fastStart.getTime())) {
|
|
13357
|
+
startEvent = makeTimedEvent(ev, fastStart, FAST_BEGINS, options);
|
|
13318
13358
|
}
|
|
13319
13359
|
if (dt.getDay() !== 5 &&
|
|
13320
13360
|
!(hd.getDate() === 14 && hd.getMonth() === months.NISAN)) {
|
|
@@ -14397,13 +14437,21 @@ class MevarchimChodeshEvent extends Event {
|
|
|
14397
14437
|
* They end when 3 medium-sized stars are observable in the night sky (sun is 7.083°
|
|
14398
14438
|
* below the horizon in the evening) in the Diaspora, or 15 minutes after sunset in
|
|
14399
14439
|
* Israel (Rabbi Deblitzky's practice). Override with:
|
|
14440
|
+
* * `options.fastStartDeg` - degrees of solar depression for the start of a minor fast
|
|
14441
|
+
* * `options.fastStartMins` - minutes before sunrise for the start of a minor fast
|
|
14442
|
+
* (mutually exclusive with `options.fastStartDeg`)
|
|
14400
14443
|
* * `options.fastEndDeg` - degrees of solar depression for the end of a minor fast
|
|
14401
14444
|
* * `options.fastEndMins` - minutes after sunset for the end of a minor fast
|
|
14402
14445
|
* (mutually exclusive with `options.fastEndDeg`)
|
|
14403
14446
|
*
|
|
14404
|
-
* Tish'a B'Av is different: it begins at sunset on the previous day and
|
|
14405
|
-
* at tzeit 6.45° (Rabbi Yechiel Michel Tucazinsky), ignoring
|
|
14406
|
-
*
|
|
14447
|
+
* Tish'a B'Av is different: it always begins at sunset on the previous day, and
|
|
14448
|
+
* by default ends at tzeit 6.45° (Rabbi Yechiel Michel Tucazinsky), ignoring the
|
|
14449
|
+
* minor fast options above. Override its end with:
|
|
14450
|
+
* * `options.tishaBavEndDeg` - degrees of solar depression for the end of Tish'a B'Av
|
|
14451
|
+
* * `options.tishaBavEndMins` - minutes after sunset for the end of Tish'a B'Av
|
|
14452
|
+
* (mutually exclusive with `options.tishaBavEndDeg`)
|
|
14453
|
+
*
|
|
14454
|
+
* When a minor fast falls on a Friday the end time is
|
|
14407
14455
|
* suppressed, because Shabbat begins before nightfall.
|
|
14408
14456
|
*
|
|
14409
14457
|
* Two options also exist for generating an Event with the Hebrew date:
|
|
@@ -14624,6 +14672,10 @@ const RECOGNIZED_OPTIONS = {
|
|
|
14624
14672
|
havdalahDeg: 1,
|
|
14625
14673
|
fastEndDeg: 1,
|
|
14626
14674
|
fastEndMins: 1,
|
|
14675
|
+
fastStartDeg: 1,
|
|
14676
|
+
fastStartMins: 1,
|
|
14677
|
+
tishaBavEndDeg: 1,
|
|
14678
|
+
tishaBavEndMins: 1,
|
|
14627
14679
|
sedrot: 1,
|
|
14628
14680
|
il: 1,
|
|
14629
14681
|
noMinorFast: 1,
|
|
@@ -14712,6 +14764,14 @@ function checkCandleOptions(options) {
|
|
|
14712
14764
|
typeof options.fastEndMins === 'number') {
|
|
14713
14765
|
throw new TypeError('options.fastEndDeg and options.fastEndMins are mutually exclusive');
|
|
14714
14766
|
}
|
|
14767
|
+
if (typeof options.fastStartDeg === 'number' &&
|
|
14768
|
+
typeof options.fastStartMins === 'number') {
|
|
14769
|
+
throw new TypeError('options.fastStartDeg and options.fastStartMins are mutually exclusive');
|
|
14770
|
+
}
|
|
14771
|
+
if (typeof options.tishaBavEndDeg === 'number' &&
|
|
14772
|
+
typeof options.tishaBavEndMins === 'number') {
|
|
14773
|
+
throw new TypeError('options.tishaBavEndDeg and options.tishaBavEndMins are mutually exclusive');
|
|
14774
|
+
}
|
|
14715
14775
|
const min0 = options.candleLightingMins;
|
|
14716
14776
|
let min = typeof min0 === 'number' && !isNaN(min0) ? Math.trunc(min0) : 18;
|
|
14717
14777
|
if (location.getIsrael() && Math.abs(min) === 18) {
|
|
@@ -14733,6 +14793,18 @@ function checkCandleOptions(options) {
|
|
|
14733
14793
|
if (typeof options.fastEndMins === 'number') {
|
|
14734
14794
|
options.fastEndMins = Math.trunc(Math.abs(options.fastEndMins));
|
|
14735
14795
|
}
|
|
14796
|
+
if (typeof options.fastStartDeg === 'number') {
|
|
14797
|
+
options.fastStartDeg = Math.abs(options.fastStartDeg);
|
|
14798
|
+
}
|
|
14799
|
+
if (typeof options.fastStartMins === 'number') {
|
|
14800
|
+
options.fastStartMins = Math.trunc(Math.abs(options.fastStartMins));
|
|
14801
|
+
}
|
|
14802
|
+
if (typeof options.tishaBavEndDeg === 'number') {
|
|
14803
|
+
options.tishaBavEndDeg = Math.abs(options.tishaBavEndDeg);
|
|
14804
|
+
}
|
|
14805
|
+
if (typeof options.tishaBavEndMins === 'number') {
|
|
14806
|
+
options.tishaBavEndMins = Math.trunc(Math.abs(options.tishaBavEndMins));
|
|
14807
|
+
}
|
|
14736
14808
|
}
|
|
14737
14809
|
function overrideIsraelCandleMins(location) {
|
|
14738
14810
|
const geoid = location.getGeoId();
|