@hebcal/core 6.0.5 → 6.0.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/README.md +42 -27
- package/dist/bundle.js +26 -15
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +3 -3
- package/dist/bundle.min.js.map +1 -1
- package/dist/esm/DailyLearning.js +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.js +2 -2
- package/dist/esm/HolidayEvent.js.map +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +2 -2
- package/dist/esm/ParshaEvent.js.map +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.js +7 -5
- package/dist/esm/calendar.js.map +1 -1
- package/dist/esm/candles.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.d.ts +2 -0
- package/dist/esm/he-x-NoNikud.po.js +2 -2
- package/dist/esm/he-x-NoNikud.po.js.map +1 -1
- package/dist/esm/he.po.d.ts +1 -0
- package/dist/esm/he.po.js +2 -2
- package/dist/esm/he.po.js.map +1 -1
- package/dist/esm/hebcal.js +1 -1
- package/dist/esm/holidays.js +1 -1
- package/dist/esm/holidays.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/isAssurBemlacha.js +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.js +2 -2
- package/dist/esm/location.js.map +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.js +1 -1
- package/dist/esm/omer.d.ts +1 -1
- package/dist/esm/omer.js +6 -2
- package/dist/esm/omer.js.map +1 -1
- package/dist/esm/parshaName.js +1 -1
- package/dist/esm/parshaYear.d.ts +2 -2
- package/dist/esm/parshaYear.js +1 -1
- package/dist/esm/parshaYear.js.map +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.d.ts +5 -1
- package/dist/esm/sedra.js +9 -3
- package/dist/esm/sedra.js.map +1 -1
- package/dist/esm/staticHolidays.js +1 -2
- package/dist/esm/staticHolidays.js.map +1 -1
- package/dist/esm/tachanun.js +1 -1
- package/dist/esm/zmanim.js +1 -1
- package/dist/he-x-NoNikud.po.d.ts +2 -0
- package/dist/he.po.d.ts +1 -0
- package/dist/omer.d.ts +1 -1
- package/dist/parshaYear.d.ts +2 -2
- package/dist/pkgVersion.d.ts +1 -1
- package/dist/po2json.d.ts +1 -0
- package/dist/po2json.js +41 -0
- package/dist/sedra.d.ts +5 -1
- package/dist/size-demo/dist/getHoliday.d.ts +1944 -0
- package/dist/size-demo/dist/getHoliday.js +3712 -0
- package/dist/size-demo/dist/parshiyot.js +10662 -0
- package/dist/size-demo/dist/sedra.d.ts +1411 -0
- package/dist/size-demo/dist/sedra.js +2359 -0
- package/dist/size-demo/dist/tachanun.d.ts +1015 -0
- package/dist/size-demo/dist/tachanun.js +1755 -0
- package/dist/size-demo/getHoliday.d.ts +1 -0
- package/dist/size-demo/getHoliday.js +3 -0
- package/dist/size-demo/parshiyot.d.ts +1 -0
- package/dist/size-demo/parshiyot.js +11 -0
- package/dist/size-demo/rollup.config.d.ts +3 -0
- package/dist/size-demo/rollup.config.js +47 -0
- package/dist/size-demo/sedra.d.ts +1 -0
- package/dist/size-demo/sedra.js +3 -0
- package/dist/size-demo/tachanun.d.ts +1 -0
- package/dist/size-demo/tachanun.js +3 -0
- package/dist/src/CalOptions.d.ts +168 -0
- package/dist/src/CalOptions.js +1 -0
- package/dist/src/DailyLearning.d.ts +32 -0
- package/dist/src/DailyLearning.js +55 -0
- package/dist/src/HebrewDateEvent.d.ts +37 -0
- package/dist/src/HebrewDateEvent.js +72 -0
- package/dist/src/HolidayEvent.d.ts +83 -0
- package/dist/src/HolidayEvent.js +186 -0
- package/dist/src/MevarchimChodeshEvent.d.ts +26 -0
- package/dist/src/MevarchimChodeshEvent.js +50 -0
- package/dist/src/ParshaEvent.d.ts +19 -0
- package/dist/src/ParshaEvent.js +43 -0
- package/dist/src/TimedEvent.d.ts +47 -0
- package/dist/src/TimedEvent.js +92 -0
- package/dist/src/YomKippurKatanEvent.d.ts +23 -0
- package/dist/src/YomKippurKatanEvent.js +38 -0
- package/dist/src/ashkenazi.po.d.ts +70 -0
- package/dist/src/ashkenazi.po.js +1 -0
- package/dist/src/calendar.d.ts +111 -0
- package/dist/src/calendar.js +660 -0
- package/dist/src/candles.d.ts +44 -0
- package/dist/src/candles.js +163 -0
- package/dist/src/event.d.ts +188 -0
- package/dist/src/event.js +233 -0
- package/dist/src/getStartAndEnd.d.ts +6 -0
- package/dist/src/getStartAndEnd.js +97 -0
- package/dist/src/hallel.d.ts +6 -0
- package/dist/src/hallel.js +47 -0
- package/dist/src/he-x-NoNikud.po.d.ts +15 -0
- package/dist/src/he-x-NoNikud.po.js +1 -0
- package/dist/src/he.po.d.ts +195 -0
- package/dist/src/he.po.js +1 -0
- package/dist/src/hebcal.d.ts +260 -0
- package/dist/src/hebcal.js +332 -0
- package/dist/src/holidays.d.ts +22 -0
- package/dist/src/holidays.js +288 -0
- package/dist/src/index.d.ts +26 -0
- package/dist/src/index.js +24 -0
- package/dist/src/isAssurBemlacha.d.ts +9 -0
- package/dist/src/isAssurBemlacha.js +62 -0
- package/dist/src/locale.d.ts +2 -0
- package/dist/src/locale.js +11 -0
- package/dist/src/location.d.ts +73 -0
- package/dist/src/location.js +306 -0
- package/dist/src/modern.d.ts +18 -0
- package/dist/src/modern.js +59 -0
- package/dist/src/molad.d.ts +62 -0
- package/dist/src/molad.js +169 -0
- package/dist/src/omer.d.ts +53 -0
- package/dist/src/omer.js +302 -0
- package/dist/src/parshaName.d.ts +2 -0
- package/dist/src/parshaName.js +13 -0
- package/dist/src/parshaYear.d.ts +9 -0
- package/dist/src/parshaYear.js +24 -0
- package/dist/src/pkgVersion.d.ts +2 -0
- package/dist/src/pkgVersion.js +2 -0
- package/dist/src/reformatTimeStr.d.ts +8 -0
- package/dist/src/reformatTimeStr.js +48 -0
- package/dist/src/sedra.d.ts +95 -0
- package/dist/src/sedra.js +477 -0
- package/dist/src/staticHolidays.d.ts +176 -0
- package/dist/src/staticHolidays.js +614 -0
- package/dist/src/tachanun.d.ts +29 -0
- package/dist/src/tachanun.js +120 -0
- package/dist/src/zmanim.d.ts +347 -0
- package/dist/src/zmanim.js +579 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +9 -0
- package/package.json +12 -9
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { HDate, months } from '@hebcal/hdate';
|
|
2
|
+
import { dateYomHaZikaron } from './modern';
|
|
3
|
+
function range(start, end) {
|
|
4
|
+
const arr = [];
|
|
5
|
+
for (let i = start; i <= end; i++) {
|
|
6
|
+
arr.push(i);
|
|
7
|
+
}
|
|
8
|
+
return arr;
|
|
9
|
+
}
|
|
10
|
+
const NONE = {
|
|
11
|
+
shacharit: false,
|
|
12
|
+
mincha: false,
|
|
13
|
+
allCongs: false,
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Return details on what Tachanun (or Tzidchatcha on Shabbat) is said on `hdate`.
|
|
17
|
+
*
|
|
18
|
+
* Tachanun is not said on Rosh Chodesh, the month of Nisan, Lag Baomer,
|
|
19
|
+
* Rosh Chodesh Sivan until Isru Chag, Tisha B'av, 15 Av, Erev Rosh Hashanah,
|
|
20
|
+
* Rosh Hashanah, Erev Yom Kippur until after Simchat Torah, Chanukah,
|
|
21
|
+
* Tu B'shvat, Purim and Shushan Purim, and Purim and Shushan Purim Katan.
|
|
22
|
+
*
|
|
23
|
+
* In some congregations Tachanun is not said until from Rosh Chodesh Sivan
|
|
24
|
+
* until 14th Sivan, Sukkot until after Rosh Chodesh Cheshvan, Pesach Sheini,
|
|
25
|
+
* Yom Ha'atzmaut, and Yom Yerushalayim.
|
|
26
|
+
*
|
|
27
|
+
* Tachanun is not said at Mincha on days before it is not said at Shacharit.
|
|
28
|
+
*
|
|
29
|
+
* Tachanun is not said at Shacharit on Shabbat, but is at Mincha, usually.
|
|
30
|
+
*/
|
|
31
|
+
export function tachanun(hdate, il) {
|
|
32
|
+
return tachanun0(hdate, il, true);
|
|
33
|
+
}
|
|
34
|
+
function tachanun0(hdate, il, checkNext) {
|
|
35
|
+
const year = hdate.yy;
|
|
36
|
+
const dates = tachanunYear(year, il);
|
|
37
|
+
const abs = hdate.abs();
|
|
38
|
+
if (dates.none.indexOf(abs) > -1) {
|
|
39
|
+
return NONE;
|
|
40
|
+
}
|
|
41
|
+
const dow = hdate.getDay();
|
|
42
|
+
const ret = {
|
|
43
|
+
shacharit: false,
|
|
44
|
+
mincha: false,
|
|
45
|
+
allCongs: false,
|
|
46
|
+
};
|
|
47
|
+
if (dates.some.indexOf(abs) === -1) {
|
|
48
|
+
ret.allCongs = true;
|
|
49
|
+
}
|
|
50
|
+
if (dow !== 6) {
|
|
51
|
+
ret.shacharit = true;
|
|
52
|
+
}
|
|
53
|
+
const tomorrow = abs + 1;
|
|
54
|
+
if (checkNext && dates.yesPrev.indexOf(tomorrow) === -1) {
|
|
55
|
+
const tmp = tachanun0(new HDate(tomorrow), il, false);
|
|
56
|
+
ret.mincha = tmp.shacharit;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
ret.mincha = dow !== 5;
|
|
60
|
+
}
|
|
61
|
+
if (ret.allCongs && !ret.mincha && !ret.shacharit) {
|
|
62
|
+
return NONE;
|
|
63
|
+
}
|
|
64
|
+
return ret;
|
|
65
|
+
}
|
|
66
|
+
function tachanunYear(year, il) {
|
|
67
|
+
const leap = HDate.isLeapYear(year);
|
|
68
|
+
const monthsInYear = HDate.monthsInYear(year);
|
|
69
|
+
let av9dt = new HDate(9, months.AV, year);
|
|
70
|
+
if (av9dt.getDay() === 6) {
|
|
71
|
+
av9dt = av9dt.next();
|
|
72
|
+
}
|
|
73
|
+
let shushPurim = new HDate(15, months.ADAR_II, year);
|
|
74
|
+
if (shushPurim.getDay() === 6) {
|
|
75
|
+
shushPurim = shushPurim.next();
|
|
76
|
+
}
|
|
77
|
+
const none = [
|
|
78
|
+
new HDate(2, months.TISHREI, year), // Rosh Hashana II
|
|
79
|
+
].concat(
|
|
80
|
+
// Rosh Chodesh - 1st of every month. Also includes RH day 1 (1 Tishrei)
|
|
81
|
+
range(1, monthsInYear).map(month => new HDate(1, month, year)),
|
|
82
|
+
// Rosh Chodesh - 30th of months that have one
|
|
83
|
+
range(1, monthsInYear)
|
|
84
|
+
.filter(month => HDate.daysInMonth(month, year) === 30)
|
|
85
|
+
.map(month => new HDate(30, month, year)),
|
|
86
|
+
// entire month of Nisan
|
|
87
|
+
range(1, HDate.daysInMonth(months.NISAN, year)).map(mday => new HDate(mday, months.NISAN, year)), new HDate(18, months.IYYAR, year), // Lag BaOmer
|
|
88
|
+
// Rosh Chodesh Sivan thru Isru Chag
|
|
89
|
+
range(1, 8 - (il ? 1 : 0)).map(mday => new HDate(mday, months.SIVAN, year)), av9dt, // Tisha B'Av
|
|
90
|
+
new HDate(15, months.AV, year), // Tu B'Av
|
|
91
|
+
new HDate(29, months.ELUL, year), // Erev Rosh Hashanah
|
|
92
|
+
// Erev Yom Kippur thru Isru Chag
|
|
93
|
+
range(9, 24 - (il ? 1 : 0)).map(mday => new HDate(mday, months.TISHREI, year)),
|
|
94
|
+
// Chanukah
|
|
95
|
+
range(25, 33).map(mday => new HDate(mday, months.KISLEV, year)), new HDate(15, months.SHVAT, year), // Tu BiShvat
|
|
96
|
+
new HDate(14, months.ADAR_II, year), // Purim
|
|
97
|
+
shushPurim, leap ? new HDate(14, months.ADAR_I, year) : [] // Purim Katan
|
|
98
|
+
);
|
|
99
|
+
const some = [
|
|
100
|
+
new HDate(14, months.IYYAR, year), // Pesach Sheini
|
|
101
|
+
].concat(
|
|
102
|
+
// Until 14 Sivan
|
|
103
|
+
range(1, 13).map(mday => new HDate(mday, months.SIVAN, year)),
|
|
104
|
+
// Until after Rosh Chodesh Cheshvan
|
|
105
|
+
range(20, 31).map(mday => new HDate(mday, months.TISHREI, year)),
|
|
106
|
+
// Yom HaAtzma'ut, which changes based on day of week
|
|
107
|
+
year >= 5708 ? dateYomHaZikaron(year).next() : [],
|
|
108
|
+
// Yom Yerushalayim
|
|
109
|
+
year >= 5727 ? new HDate(28, months.IYYAR, year) : []);
|
|
110
|
+
const yesPrev = [
|
|
111
|
+
new HDate(29, months.ELUL, year - 1), // Erev Rosh Hashanah
|
|
112
|
+
new HDate(9, months.TISHREI, year), // Erev Yom Kippur
|
|
113
|
+
new HDate(14, months.IYYAR, year), // Pesach Sheini
|
|
114
|
+
];
|
|
115
|
+
return {
|
|
116
|
+
none: none.map(hd => hd.abs()).sort((a, b) => a - b),
|
|
117
|
+
some: some.map(hd => hd.abs()).sort((a, b) => a - b),
|
|
118
|
+
yesPrev: yesPrev.map(hd => hd.abs()).sort((a, b) => a - b),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import 'temporal-polyfill/global';
|
|
2
|
+
import { GeoLocation } from '@hebcal/noaa';
|
|
3
|
+
import { HDate } from '@hebcal/hdate';
|
|
4
|
+
/**
|
|
5
|
+
* Calculate halachic times (zmanim / זְמַנִּים) for a given day and location.
|
|
6
|
+
* Calculations are available for tzeit / tzais (nightfall),
|
|
7
|
+
* shkiah (sunset) and more.
|
|
8
|
+
*
|
|
9
|
+
* Zmanim are estimated using an algorithm published by the US National Oceanic
|
|
10
|
+
* and Atmospheric Administration. The NOAA solar calculator is based on equations
|
|
11
|
+
* from _Astronomical Algorithms_ by Jean Meeus.
|
|
12
|
+
*
|
|
13
|
+
* The sunrise and sunset results are theoretically accurate to within a minute for
|
|
14
|
+
* locations between +/- 72° latitude, and within 10 minutes outside of those latitudes.
|
|
15
|
+
* However, due to variations in atmospheric composition, temperature, pressure and
|
|
16
|
+
* conditions, observed values may vary from calculations.
|
|
17
|
+
* https://gml.noaa.gov/grad/solcalc/calcdetails.html
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* const {GeoLocation, Zmanim} = require('@hebcal/core');
|
|
21
|
+
* const latitude = 41.822232;
|
|
22
|
+
* const longitude = -71.448292;
|
|
23
|
+
* const tzid = 'America/New_York';
|
|
24
|
+
* const friday = new Date(2023, 8, 8);
|
|
25
|
+
* const gloc = new GeoLocation(null, latitude, longitude, 0, tzid);
|
|
26
|
+
* const zmanim = new Zmanim(gloc, friday, false);
|
|
27
|
+
* const candleLighting = zmanim.sunsetOffset(-18, true);
|
|
28
|
+
* const timeStr = Zmanim.formatISOWithTimeZone(tzid, candleLighting);
|
|
29
|
+
*/
|
|
30
|
+
export declare class Zmanim {
|
|
31
|
+
private readonly date;
|
|
32
|
+
private readonly gloc;
|
|
33
|
+
private readonly noaa;
|
|
34
|
+
private useElevation;
|
|
35
|
+
/**
|
|
36
|
+
* Initialize a Zmanim instance.
|
|
37
|
+
* @param gloc GeoLocation including latitude, longitude, and timezone
|
|
38
|
+
* @param date Regular or Hebrew Date. If `date` is a regular `Date`,
|
|
39
|
+
* hours, minutes, seconds and milliseconds are ignored.
|
|
40
|
+
* @param useElevation use elevation for calculations (default `false`).
|
|
41
|
+
* If `true`, use elevation to affect the calculation of all sunrise/sunset based
|
|
42
|
+
* zmanim. Note: there are some zmanim such as degree-based zmanim that are driven
|
|
43
|
+
* by the amount of light in the sky and are not impacted by elevation.
|
|
44
|
+
* These zmanim intentionally do not support elevation adjustment.
|
|
45
|
+
*/
|
|
46
|
+
constructor(gloc: GeoLocation, date: Date | HDate, useElevation: boolean);
|
|
47
|
+
/**
|
|
48
|
+
* Returns `true` if elevation adjustment is enabled
|
|
49
|
+
* for zmanim support elevation adjustment
|
|
50
|
+
*/
|
|
51
|
+
getUseElevation(): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Enables or disables elevation adjustment for zmanim support elevation adjustment
|
|
54
|
+
* @param useElevation
|
|
55
|
+
*/
|
|
56
|
+
setUseElevation(useElevation: boolean): void;
|
|
57
|
+
/**
|
|
58
|
+
* Convenience function to get the time when sun is above or below the horizon
|
|
59
|
+
* for a certain angle (in degrees).
|
|
60
|
+
* This function does not support elevation adjustment.
|
|
61
|
+
* @param angle
|
|
62
|
+
* @param rising
|
|
63
|
+
*/
|
|
64
|
+
timeAtAngle(angle: number, rising: boolean): Date;
|
|
65
|
+
/**
|
|
66
|
+
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon)
|
|
67
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
68
|
+
*/
|
|
69
|
+
sunrise(): Date;
|
|
70
|
+
/**
|
|
71
|
+
* Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon).
|
|
72
|
+
* This function does not support elevation adjustment.
|
|
73
|
+
*/
|
|
74
|
+
seaLevelSunrise(): Date;
|
|
75
|
+
/**
|
|
76
|
+
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
|
|
77
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
78
|
+
*/
|
|
79
|
+
sunset(): Date;
|
|
80
|
+
/**
|
|
81
|
+
* When the upper edge of the Sun disappears below the horizon (0.833° below horizon).
|
|
82
|
+
* This function does not support elevation adjustment.
|
|
83
|
+
*/
|
|
84
|
+
seaLevelSunset(): Date;
|
|
85
|
+
/**
|
|
86
|
+
* Civil dawn; Sun is 6° below the horizon in the morning.
|
|
87
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
88
|
+
* the result is not impacted by elevation.
|
|
89
|
+
*/
|
|
90
|
+
dawn(): Date;
|
|
91
|
+
/**
|
|
92
|
+
* Civil dusk; Sun is 6° below the horizon in the evening.
|
|
93
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
94
|
+
* the result is not impacted by elevation.
|
|
95
|
+
*/
|
|
96
|
+
dusk(): Date;
|
|
97
|
+
/**
|
|
98
|
+
* Returns sunset for the previous day.
|
|
99
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
100
|
+
*/
|
|
101
|
+
gregEve(): Date;
|
|
102
|
+
/**
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
nightHour(): number;
|
|
106
|
+
/**
|
|
107
|
+
* Midday – Chatzot; Sunrise plus 6 halachic hours
|
|
108
|
+
*/
|
|
109
|
+
chatzot(): Date;
|
|
110
|
+
/**
|
|
111
|
+
* Midnight – Chatzot; Sunset plus 6 halachic hours.
|
|
112
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
113
|
+
*/
|
|
114
|
+
chatzotNight(): Date;
|
|
115
|
+
/**
|
|
116
|
+
* Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning.
|
|
117
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
118
|
+
* the result is not impacted by elevation.
|
|
119
|
+
*/
|
|
120
|
+
alotHaShachar(): Date;
|
|
121
|
+
/**
|
|
122
|
+
* Dawn – Alot haShachar; calculated as 72 minutes before sunrise or
|
|
123
|
+
* sea level sunrise.
|
|
124
|
+
*/
|
|
125
|
+
alotHaShachar72(): Date;
|
|
126
|
+
/**
|
|
127
|
+
* Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning.
|
|
128
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
129
|
+
* the result is not impacted by elevation.
|
|
130
|
+
*/
|
|
131
|
+
misheyakir(): Date;
|
|
132
|
+
/**
|
|
133
|
+
* Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning.
|
|
134
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
135
|
+
* the result is not impacted by elevation.
|
|
136
|
+
*/
|
|
137
|
+
misheyakirMachmir(): Date;
|
|
138
|
+
/**
|
|
139
|
+
* Utility method for using elevation-aware sunrise/sunset
|
|
140
|
+
* @private
|
|
141
|
+
* @param hours
|
|
142
|
+
*/
|
|
143
|
+
getShaahZmanisBasedZman(hours: number): Date;
|
|
144
|
+
/**
|
|
145
|
+
* Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra.
|
|
146
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
147
|
+
*/
|
|
148
|
+
sofZmanShma(): Date;
|
|
149
|
+
/**
|
|
150
|
+
* Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra.
|
|
151
|
+
*
|
|
152
|
+
* This method returns the latest *zman tfila* (time to recite shema in the morning)
|
|
153
|
+
* that is 4 *shaos zmaniyos* (solar hours) after sunrise or sea level sunrise
|
|
154
|
+
* (depending on the `useElevation` setting), according
|
|
155
|
+
* to the [GRA](https://en.wikipedia.org/wiki/Vilna_Gaon).
|
|
156
|
+
*
|
|
157
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
158
|
+
*/
|
|
159
|
+
sofZmanTfilla(): Date;
|
|
160
|
+
/**
|
|
161
|
+
* Returns an array with alot (Date) and ms in hour (number)
|
|
162
|
+
* @private
|
|
163
|
+
*/
|
|
164
|
+
getTemporalHour72(forceSeaLevel: boolean): [Date, number];
|
|
165
|
+
/**
|
|
166
|
+
* Returns an array with alot (Date) and ms in hour (number)
|
|
167
|
+
* @private
|
|
168
|
+
*/
|
|
169
|
+
getTemporalHourByDeg(angle: number): [Date, number];
|
|
170
|
+
/**
|
|
171
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
172
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
173
|
+
* dawn being fixed 72 minutes before sea-level sunrise, and nightfall is fixed
|
|
174
|
+
* 72 minutes after sea-level sunset.
|
|
175
|
+
*/
|
|
176
|
+
sofZmanShmaMGA(): Date;
|
|
177
|
+
/**
|
|
178
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
179
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
180
|
+
* dawn to nightfall with both being 16.1° below the horizon.
|
|
181
|
+
*/
|
|
182
|
+
sofZmanShmaMGA16Point1(): Date;
|
|
183
|
+
/**
|
|
184
|
+
* Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham.
|
|
185
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
186
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
187
|
+
*
|
|
188
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
189
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
190
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
191
|
+
*/
|
|
192
|
+
sofZmanShmaMGA19Point8(): Date;
|
|
193
|
+
/**
|
|
194
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham
|
|
195
|
+
*/
|
|
196
|
+
sofZmanTfillaMGA(): Date;
|
|
197
|
+
/**
|
|
198
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
199
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
200
|
+
* dawn to nightfall with both being 16.1° below the horizon.
|
|
201
|
+
*/
|
|
202
|
+
sofZmanTfillaMGA16Point1(): Date;
|
|
203
|
+
/**
|
|
204
|
+
* Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham.
|
|
205
|
+
* Based on the opinion of the MGA that the day is calculated from
|
|
206
|
+
* dawn to nightfall with both being 19.8° below the horizon.
|
|
207
|
+
*
|
|
208
|
+
* This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem
|
|
209
|
+
* around the equinox / equilux which calculates to 19.8° below geometric zenith.
|
|
210
|
+
* https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
|
|
211
|
+
*/
|
|
212
|
+
sofZmanTfillaMGA19Point8(): Date;
|
|
213
|
+
/**
|
|
214
|
+
* Earliest Mincha – Mincha Gedola (GRA); Sunrise plus 6.5 halachic hours.
|
|
215
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
216
|
+
*
|
|
217
|
+
* This method returns the latest mincha gedola, the earliest time one can pray mincha
|
|
218
|
+
* that is 6.5 shaos zmaniyos (solar hours) after sunrise or sea level sunrise
|
|
219
|
+
* (depending on the `useElevation` setting), according
|
|
220
|
+
* to the [GRA](https://en.wikipedia.org/wiki/Vilna_Gaon).
|
|
221
|
+
*
|
|
222
|
+
* The Ramba"m is of the opinion that it is better to delay *mincha* until
|
|
223
|
+
* *mincha ketana* while the Ra"sh, Tur, GRA and others are of the
|
|
224
|
+
* opinion that *mincha* can be prayed *lechatchila* starting at *mincha gedola*.
|
|
225
|
+
*/
|
|
226
|
+
minchaGedola(): Date;
|
|
227
|
+
/**
|
|
228
|
+
* Earliest Mincha – Mincha Gedola (MGA); Sunrise plus 6.5 halachic hours.
|
|
229
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
230
|
+
*
|
|
231
|
+
* This method returns the time of *mincha gedola* according to the Magen Avraham
|
|
232
|
+
* with the day starting 72 minutes before sunrise and ending 72 minutes after sunset.
|
|
233
|
+
* This is the earliest time to pray *mincha*.
|
|
234
|
+
*/
|
|
235
|
+
minchaGedolaMGA(): Date;
|
|
236
|
+
/**
|
|
237
|
+
* Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours.
|
|
238
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
239
|
+
*
|
|
240
|
+
* This method returns *mincha ketana*, the preferred earliest time to pray *mincha* in the
|
|
241
|
+
* opinion of the [Rambam](https://en.wikipedia.org/wiki/Maimonides) and others,
|
|
242
|
+
* that is 9.5 *shaos zmaniyos* (solar hours) after sunrise or sea level sunrise
|
|
243
|
+
* (depending on the `useElevation` setting), according
|
|
244
|
+
* to the [GRA](https://en.wikipedia.org/wiki/Vilna_Gaon).
|
|
245
|
+
*/
|
|
246
|
+
minchaKetana(): Date;
|
|
247
|
+
/**
|
|
248
|
+
* This method returns the time of *mincha ketana* according to the Magen Avraham
|
|
249
|
+
* with the day starting 72 minutes before sunrise and ending 72 minutes after sunset.
|
|
250
|
+
* This is the preferred earliest time to pray *mincha* according to the opinion of
|
|
251
|
+
* the [Rambam](https://en.wikipedia.org/wiki/Maimonides) and others.
|
|
252
|
+
*
|
|
253
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
254
|
+
*/
|
|
255
|
+
minchaKetanaMGA(): Date;
|
|
256
|
+
/**
|
|
257
|
+
* Plag haMincha; Sunrise plus 10.75 halachic hours.
|
|
258
|
+
* If elevation is enabled, this function will include elevation in the calculation.
|
|
259
|
+
*/
|
|
260
|
+
plagHaMincha(): Date;
|
|
261
|
+
/**
|
|
262
|
+
* @param [angle=8.5] optional time for solar depression.
|
|
263
|
+
* Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars.
|
|
264
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
265
|
+
* the result is not impacted by elevation.
|
|
266
|
+
*/
|
|
267
|
+
tzeit(angle?: number): Date;
|
|
268
|
+
/**
|
|
269
|
+
* Alias for sunrise
|
|
270
|
+
*/
|
|
271
|
+
neitzHaChama(): Date;
|
|
272
|
+
/**
|
|
273
|
+
* Alias for sunset
|
|
274
|
+
*/
|
|
275
|
+
shkiah(): Date;
|
|
276
|
+
/**
|
|
277
|
+
* Rabbeinu Tam holds that bein hashmashos is a specific time
|
|
278
|
+
* between sunset and tzeis hakochavim.
|
|
279
|
+
* One opinion on how to calculate this time is that
|
|
280
|
+
* it is 13.5 minutes before tzies 7.083.
|
|
281
|
+
* Because degree-based functions estimate the amount of light in the sky,
|
|
282
|
+
* the result is not impacted by elevation.
|
|
283
|
+
*/
|
|
284
|
+
beinHaShmashos(): Date;
|
|
285
|
+
/**
|
|
286
|
+
* Uses timeFormat to return a date like '20:34'.
|
|
287
|
+
* Returns `XX:XX` if the date is invalid.
|
|
288
|
+
*/
|
|
289
|
+
static formatTime(dt: Date, timeFormat: Intl.DateTimeFormat): string;
|
|
290
|
+
/**
|
|
291
|
+
* Discards seconds, rounding to nearest minute.
|
|
292
|
+
* @param dt
|
|
293
|
+
*/
|
|
294
|
+
static roundTime(dt: Date): Date;
|
|
295
|
+
/**
|
|
296
|
+
* Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
|
|
297
|
+
* @param tzid
|
|
298
|
+
* @param date
|
|
299
|
+
*/
|
|
300
|
+
static timeZoneOffset(tzid: string, date: Date): string;
|
|
301
|
+
/**
|
|
302
|
+
* Returns a string like "2022-04-01T13:06:00-11:00"
|
|
303
|
+
* @param tzid
|
|
304
|
+
* @param date
|
|
305
|
+
*/
|
|
306
|
+
static formatISOWithTimeZone(tzid: string, date: Date): string;
|
|
307
|
+
/**
|
|
308
|
+
* Returns sunrise + `offset` minutes (either positive or negative).
|
|
309
|
+
* If elevation is enabled, this function will include elevation in the calculation
|
|
310
|
+
* unless `forceSeaLevel` is `true`.
|
|
311
|
+
* @param offset minutes
|
|
312
|
+
* @param roundMinute round time to nearest minute (default true)
|
|
313
|
+
* @param forceSeaLevel use sea-level sunrise (default false)
|
|
314
|
+
*/
|
|
315
|
+
sunriseOffset(offset: number, roundMinute?: boolean, forceSeaLevel?: boolean): Date;
|
|
316
|
+
/**
|
|
317
|
+
* Returns sunset + `offset` minutes (either positive or negative).
|
|
318
|
+
* If elevation is enabled, this function will include elevation in the calculation
|
|
319
|
+
* unless `forceSeaLevel` is `true`.
|
|
320
|
+
* @param offset minutes
|
|
321
|
+
* @param roundMinute round time to nearest minute (default true)
|
|
322
|
+
* @param forceSeaLevel use sea-level sunset (default false)
|
|
323
|
+
*/
|
|
324
|
+
sunsetOffset(offset: number, roundMinute?: boolean, forceSeaLevel?: boolean): Date;
|
|
325
|
+
/**
|
|
326
|
+
* Returns the Hebrew date relative to the specified location and Gregorian date,
|
|
327
|
+
* taking into consideration whether the time is before or after sunset.
|
|
328
|
+
*
|
|
329
|
+
* For example, if the given date and is `2024-09-22T10:35` (before sunset), and
|
|
330
|
+
* sunset for the specified location is **19:04**, then this function would
|
|
331
|
+
* return a Hebrew date of `19th of Elul, 5784`.
|
|
332
|
+
* If the given date is the same Gregorian day after sunset
|
|
333
|
+
* (for example `2024-09-22T20:07`), this function would return a
|
|
334
|
+
* Hebrew date of `20th of Elul, 5784`.
|
|
335
|
+
* @example
|
|
336
|
+
* const {GeoLocation, Zmanim, HDate} = require('@hebcal/core');
|
|
337
|
+
* const latitude = 48.85341;
|
|
338
|
+
* const longitude = 2.3488;
|
|
339
|
+
* const timezone = 'Europe/Paris';
|
|
340
|
+
* const gloc = new GeoLocation(null, latitude, longitude, 0, timezone);
|
|
341
|
+
* const before = Zmanim.makeSunsetAwareHDate(gloc, new Date('2024-09-22T17:38:46.123Z'), false);
|
|
342
|
+
* console.log(before.toString()); // '19 Elul 5784'
|
|
343
|
+
* const after = Zmanim.makeSunsetAwareHDate(gloc, new Date('2024-09-22T23:45:18.345Z'), false);
|
|
344
|
+
* console.log(after.toString()); // '20 Elul 5784'
|
|
345
|
+
*/
|
|
346
|
+
static makeSunsetAwareHDate(gloc: GeoLocation, date: Date, useElevation: boolean): HDate;
|
|
347
|
+
}
|