@hebcal/core 6.6.0 → 6.8.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 +4 -4
- package/dist/bundle.js +224 -95
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +18 -18
- package/dist/bundle.min.js.map +1 -1
- package/dist/esm/CalOptions.d.ts +15 -3
- package/dist/esm/DailyLearning.js +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.d.ts +2 -2
- package/dist/esm/HolidayEvent.js +3 -5
- package/dist/esm/HolidayEvent.js.map +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +16 -6
- package/dist/esm/ParshaEvent.js.map +1 -1
- package/dist/esm/TimedEvent.js +1 -1
- package/dist/esm/TimedEvent.js.map +1 -1
- package/dist/esm/YomKippurKatanEvent.js +1 -1
- package/dist/esm/ashkenazi.po.js +2 -2
- package/dist/esm/ashkenazi.po.js.map +1 -1
- package/dist/esm/calendar.js +17 -23
- package/dist/esm/calendar.js.map +1 -1
- package/dist/esm/candles.d.ts +8 -3
- package/dist/esm/candles.js +65 -11
- package/dist/esm/candles.js.map +1 -1
- package/dist/esm/cities.json.js +1 -1
- package/dist/esm/event.js +2 -2
- package/dist/esm/event.js.map +1 -1
- package/dist/esm/getStartAndEnd.js +8 -6
- package/dist/esm/getStartAndEnd.js.map +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 +6 -5
- 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/isAveilut.js +1 -1
- package/dist/esm/isFastDay.js +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.js +12 -13
- package/dist/esm/location.js.map +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.js +5 -5
- package/dist/esm/molad.js.map +1 -1
- package/dist/esm/moladBase.js +1 -1
- package/dist/esm/moladDate.js +1 -1
- package/dist/esm/moladDate.js.map +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/reformatTimeStr.js.map +1 -1
- package/dist/esm/sedra.d.ts +14 -0
- package/dist/esm/sedra.js +70 -13
- package/dist/esm/sedra.js.map +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/tachanun.js.map +1 -1
- package/dist/esm/zmanim.js +2 -3
- package/dist/esm/zmanim.js.map +1 -1
- package/package.json +14 -17
- package/po/ashkenazi.po +1 -12
- package/dist/eslint.config.d.mts +0 -83
- package/dist/eslint.config.mjs +0 -29
- package/dist/po2json.d.ts +0 -1
- package/dist/po2json.js +0 -40
- package/dist/src/CalOptions.d.ts +0 -171
- package/dist/src/CalOptions.js +0 -1
- package/dist/src/DailyLearning.d.ts +0 -69
- package/dist/src/DailyLearning.js +0 -92
- package/dist/src/HebrewDateEvent.d.ts +0 -37
- package/dist/src/HebrewDateEvent.js +0 -72
- package/dist/src/HolidayEvent.d.ts +0 -117
- package/dist/src/HolidayEvent.js +0 -236
- package/dist/src/MevarchimChodeshEvent.d.ts +0 -26
- package/dist/src/MevarchimChodeshEvent.js +0 -52
- package/dist/src/ParshaEvent.d.ts +0 -24
- package/dist/src/ParshaEvent.js +0 -50
- package/dist/src/TimedEvent.d.ts +0 -76
- package/dist/src/TimedEvent.js +0 -134
- package/dist/src/YomKippurKatanEvent.d.ts +0 -23
- package/dist/src/YomKippurKatanEvent.js +0 -40
- package/dist/src/ashkenazi.po.d.ts +0 -84
- package/dist/src/ashkenazi.po.js +0 -1
- package/dist/src/calendar.d.ts +0 -112
- package/dist/src/calendar.js +0 -721
- package/dist/src/candles.d.ts +0 -57
- package/dist/src/candles.js +0 -185
- package/dist/src/cities.json +0 -67
- package/dist/src/event.d.ts +0 -233
- package/dist/src/event.js +0 -295
- package/dist/src/getStartAndEnd.d.ts +0 -6
- package/dist/src/getStartAndEnd.js +0 -105
- package/dist/src/hallel.d.ts +0 -6
- package/dist/src/hallel.js +0 -39
- package/dist/src/he-x-NoNikud.po.d.ts +0 -28
- package/dist/src/he-x-NoNikud.po.js +0 -1
- package/dist/src/he.po.d.ts +0 -217
- package/dist/src/he.po.js +0 -1
- package/dist/src/hebcal.d.ts +0 -338
- package/dist/src/hebcal.js +0 -413
- package/dist/src/holidays.d.ts +0 -41
- package/dist/src/holidays.js +0 -324
- package/dist/src/index.d.ts +0 -30
- package/dist/src/index.js +0 -29
- package/dist/src/isAssurBemlacha.d.ts +0 -29
- package/dist/src/isAssurBemlacha.js +0 -82
- package/dist/src/isAveilut.d.ts +0 -22
- package/dist/src/isAveilut.js +0 -48
- package/dist/src/isFastDay.d.ts +0 -21
- package/dist/src/isFastDay.js +0 -31
- package/dist/src/locale.d.ts +0 -1
- package/dist/src/locale.js +0 -11
- package/dist/src/location.d.ts +0 -167
- package/dist/src/location.js +0 -342
- package/dist/src/modern.d.ts +0 -18
- package/dist/src/modern.js +0 -59
- package/dist/src/molad.d.ts +0 -164
- package/dist/src/molad.js +0 -298
- package/dist/src/moladBase.d.ts +0 -15
- package/dist/src/moladBase.js +0 -78
- package/dist/src/moladDate.d.ts +0 -12
- package/dist/src/moladDate.js +0 -58
- package/dist/src/omer.d.ts +0 -128
- package/dist/src/omer.js +0 -385
- package/dist/src/parshaName.d.ts +0 -2
- package/dist/src/parshaName.js +0 -13
- package/dist/src/parshaYear.d.ts +0 -20
- package/dist/src/parshaYear.js +0 -35
- package/dist/src/pkgVersion.d.ts +0 -2
- package/dist/src/pkgVersion.js +0 -2
- package/dist/src/reformatTimeStr.d.ts +0 -8
- package/dist/src/reformatTimeStr.js +0 -47
- package/dist/src/sedra.d.ts +0 -175
- package/dist/src/sedra.js +0 -563
- package/dist/src/sefira.json +0 -63
- package/dist/src/staticHolidays.d.ts +0 -192
- package/dist/src/staticHolidays.js +0 -637
- package/dist/src/string.d.ts +0 -2
- package/dist/src/string.js +0 -6
- package/dist/src/tachanun.d.ts +0 -29
- package/dist/src/tachanun.js +0 -120
- package/dist/src/zmanim.d.ts +0 -620
- package/dist/src/zmanim.js +0 -1003
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -8
package/dist/src/sedra.d.ts
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { HDate } from '@hebcal/hdate';
|
|
2
|
-
import './locale';
|
|
3
|
-
/** The result from `Sedra.lookup()` */
|
|
4
|
-
export type SedraResult = {
|
|
5
|
-
/**
|
|
6
|
-
* Name of the parsha (or parshiyot) read on
|
|
7
|
-
* Hebrew date, e.g. `['Noach']` or `['Matot', 'Masei']`
|
|
8
|
-
*/
|
|
9
|
-
parsha: string[];
|
|
10
|
-
/**
|
|
11
|
-
* False if this is a regular parashat HaShavua reading.
|
|
12
|
-
* True if it's a special holiday reading.
|
|
13
|
-
*/
|
|
14
|
-
chag: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* The parsha number (or numbers) using 1-indexing.
|
|
17
|
-
* A `number` for a regular (single) parsha, and a `number[]`
|
|
18
|
-
* for a doubled parsha.
|
|
19
|
-
* For Parashat *Bereshit*, `num` would be equal to `1`, and for
|
|
20
|
-
* *Matot-Masei* it would be `[42, 43]`
|
|
21
|
-
* For a chag (holiday) reading, `num` will be `0`.
|
|
22
|
-
*/
|
|
23
|
-
num: number | number[];
|
|
24
|
-
/** The date of the Shabbat this parsha is read */
|
|
25
|
-
hdate: HDate;
|
|
26
|
-
/** true if Israel, false for Diaspora */
|
|
27
|
-
il: boolean;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Represents the weekly Torah-reading (Parashat HaShavua) schedule for an
|
|
31
|
-
* entire Hebrew year.
|
|
32
|
-
*
|
|
33
|
-
* The schedule depends on the year's *keviyah* — the day of week of Rosh
|
|
34
|
-
* Hashana, whether the year is leap, whether Cheshvan/Kislev are long or
|
|
35
|
-
* short, and whether the schedule is for Israel or the Diaspora (since
|
|
36
|
-
* Israel and the Diaspora diverge in some years when the 8th day of Pesach
|
|
37
|
-
* or the 2nd day of Shavuot fall on Shabbat).
|
|
38
|
-
*
|
|
39
|
-
* Prefer {@link getSedra} (or {@link HebrewCalendar.getSedra}) over
|
|
40
|
-
* calling this constructor directly, since both cache their results.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* import {Sedra, HDate, months} from '@hebcal/core';
|
|
44
|
-
* const sedra = new Sedra(5784, false);
|
|
45
|
-
* const result = sedra.lookup(new HDate(15, months.CHESHVAN, 5784));
|
|
46
|
-
* console.log(result.parsha); // ['Lech-Lecha']
|
|
47
|
-
*/
|
|
48
|
-
export declare class Sedra {
|
|
49
|
-
private readonly year;
|
|
50
|
-
private readonly il;
|
|
51
|
-
private readonly rh;
|
|
52
|
-
private readonly firstSaturday;
|
|
53
|
-
private readonly theSedraArray;
|
|
54
|
-
private readonly yearKey;
|
|
55
|
-
/**
|
|
56
|
-
* Calculates the Parashat HaShavua schedule for an entire Hebrew year.
|
|
57
|
-
* @param hyear - Hebrew year (e.g. 5749)
|
|
58
|
-
* @param il - Use Israel sedra schedule (false for Diaspora)
|
|
59
|
-
*/
|
|
60
|
-
constructor(hyear: number, il: boolean);
|
|
61
|
-
/**
|
|
62
|
-
* Returns the date a parsha is read this year, or `null` if it does not
|
|
63
|
-
* occur in this year's schedule.
|
|
64
|
-
*
|
|
65
|
-
* A doubled parsha (e.g. `'Matot-Masei'`) will only return a date in years
|
|
66
|
-
* where that pair is actually read together; in years where they are read
|
|
67
|
-
* separately, this returns `null`. Use {@link findContaining} to find the
|
|
68
|
-
* date a parsha is read regardless of whether it is doubled.
|
|
69
|
-
*
|
|
70
|
-
* Throws `RangeError` for an out-of-range numeric input or an invalid
|
|
71
|
-
* doubled-parsha pair, and `TypeError` for a malformed array argument.
|
|
72
|
-
* @example
|
|
73
|
-
* import {Sedra} from '@hebcal/core';
|
|
74
|
-
* const sedra = new Sedra(5784, false);
|
|
75
|
-
* sedra.find('Noach')?.toString(); // '15 Cheshvan 5784'
|
|
76
|
-
* sedra.find(1)?.toString(); // same, by 0-based index
|
|
77
|
-
* sedra.find('Matot-Masei')?.toString(); // null in 5784 — read separately
|
|
78
|
-
* sedra.find(['Matot', 'Masei']); // also null in 5784
|
|
79
|
-
* @param parsha if a `string`, specified with Sephardic transliterations
|
|
80
|
-
* like `'Noach'` or `'Matot-Masei'`. If an array, must be a 1- or 2-element
|
|
81
|
-
* array such as `['Noach']` or `['Matot', 'Masei']`. If a `number`, should
|
|
82
|
-
* be a 0-based parsha index (`0` for Bereshit, `1` for Noach) or a negative
|
|
83
|
-
* number for a doubled parsha (e.g. `-21` for Vayakhel-Pekudei)
|
|
84
|
-
*/
|
|
85
|
-
find(parsha: number | string | string[]): HDate | null;
|
|
86
|
-
private findInternal;
|
|
87
|
-
/**
|
|
88
|
-
* Returns the date a parsha is read this year, looking through both
|
|
89
|
-
* single and doubled forms.
|
|
90
|
-
*
|
|
91
|
-
* For example, if `'Matot'` is read individually this year, this returns
|
|
92
|
-
* its date; if it is read as part of `'Matot-Masei'` this year, this
|
|
93
|
-
* returns the date of `'Matot-Masei'` (and similarly for `'Masei'`).
|
|
94
|
-
* Conversely, asking for `'Matot-Masei'` in a year where they are split
|
|
95
|
-
* will return the date of `'Matot'` alone.
|
|
96
|
-
* @example
|
|
97
|
-
* import {Sedra} from '@hebcal/core';
|
|
98
|
-
* const sedra = new Sedra(5784, false);
|
|
99
|
-
* // Matot-Masei is split in 5784; both individual halves resolve:
|
|
100
|
-
* sedra.findContaining('Matot')?.toString(); // '22 Tamuz 5784'
|
|
101
|
-
* sedra.findContaining('Masei')?.toString(); // '29 Tamuz 5784'
|
|
102
|
-
* // Asking for the doubled name returns the date of the first half:
|
|
103
|
-
* sedra.findContaining('Matot-Masei')?.toString(); // '22 Tamuz 5784'
|
|
104
|
-
*/
|
|
105
|
-
findContaining(parsha: number | string): HDate | null;
|
|
106
|
-
/**
|
|
107
|
-
* Returns the underlying annual reading schedule as an array, where each
|
|
108
|
-
* entry corresponds to one Saturday (starting from the first Shabbat on
|
|
109
|
-
* or after Rosh Hashana). Entries are either:
|
|
110
|
-
* - a non-negative `number`: a 0-based parsha index (e.g. `0` for
|
|
111
|
-
* *Bereshit*)
|
|
112
|
-
* - a negative `number`: the negated first index of a doubled parsha
|
|
113
|
-
* (e.g. `-21` for *Vayakhel-Pekudei*)
|
|
114
|
-
* - a `string`: a holiday name when a Yom Tov displaces the weekly reading
|
|
115
|
-
* (e.g. `'Pesach Shabbat Chol ha-Moed'`, `'Yom Kippur'`)
|
|
116
|
-
*
|
|
117
|
-
* Used by `@hebcal/triennial`.
|
|
118
|
-
*/
|
|
119
|
-
getSedraArray(): readonly NumberOrString[];
|
|
120
|
-
/**
|
|
121
|
-
* Returns the R.D. (Rata Die / Fixed Date) absolute day number of the
|
|
122
|
-
* first Saturday on or after Rosh Hashana of this year. This is the
|
|
123
|
-
* anchor point for {@link getSedraArray} — index `0` of that array
|
|
124
|
-
* corresponds to this date.
|
|
125
|
-
*/
|
|
126
|
-
getFirstSaturday(): number;
|
|
127
|
-
/** Returns the Hebrew year this `Sedra` instance covers. */
|
|
128
|
-
getYear(): number;
|
|
129
|
-
/**
|
|
130
|
-
* Returns details about the parsha read on the first Saturday on or after
|
|
131
|
-
* `hd`. If `hd` is itself a Saturday, the reading for that date is
|
|
132
|
-
* returned; otherwise the reading for the upcoming Saturday is returned.
|
|
133
|
-
*
|
|
134
|
-
* If the given date falls in the final days of the Hebrew year (after
|
|
135
|
-
* the last reading of this year's schedule), this method transparently
|
|
136
|
-
* delegates to the next year's `Sedra`.
|
|
137
|
-
* @example
|
|
138
|
-
* import {Sedra, HDate, months} from '@hebcal/core';
|
|
139
|
-
* const sedra = new Sedra(5784, false);
|
|
140
|
-
* // A weekday — returns the upcoming Shabbat's reading
|
|
141
|
-
* const result = sedra.lookup(new HDate(13, months.CHESHVAN, 5784));
|
|
142
|
-
* console.log(result.parsha); // ['Lech-Lecha']
|
|
143
|
-
* console.log(result.chag); // false
|
|
144
|
-
* console.log(result.hdate.toString()); // '15 Cheshvan 5784' (Saturday)
|
|
145
|
-
* @param hd Hebrew date or R.D. days
|
|
146
|
-
*/
|
|
147
|
-
lookup(hd: HDate | number): SedraResult;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* The 54 parshiyot of the Torah as transilterated strings.
|
|
151
|
-
* * parshiot[0] == `Bereshit`
|
|
152
|
-
* * parshiot[1] == `Noach`
|
|
153
|
-
* * parshiot[52] == `Ha'azinu`
|
|
154
|
-
* * parshiot[53] == `Vezot Haberakhah`
|
|
155
|
-
* @readonly
|
|
156
|
-
* @type {string[]}
|
|
157
|
-
*/
|
|
158
|
-
export declare const parshiot: readonly string[];
|
|
159
|
-
type NumberOrString = number | string;
|
|
160
|
-
/**
|
|
161
|
-
* Convenience function to create an instance of {@link Sedra} or reuse a
|
|
162
|
-
* previously created and cached instance for the same year and schedule.
|
|
163
|
-
*
|
|
164
|
-
* Prefer this over `new Sedra(...)` when calling repeatedly — an internal
|
|
165
|
-
* LRU cache (~120 entries) avoids recomputing the keviyah-specific schedule.
|
|
166
|
-
* @example
|
|
167
|
-
* import {getSedra, HDate, months} from '@hebcal/core';
|
|
168
|
-
* const sedra = getSedra(5784, false);
|
|
169
|
-
* const {parsha} = sedra.lookup(new HDate(15, months.CHESHVAN, 5784));
|
|
170
|
-
* console.log(parsha); // ['Lech-Lecha']
|
|
171
|
-
* @param hyear Hebrew year
|
|
172
|
-
* @param il Use Israel sedra schedule (`false` for Diaspora)
|
|
173
|
-
*/
|
|
174
|
-
export declare function getSedra(hyear: number, il: boolean): Sedra;
|
|
175
|
-
export {};
|