@hebcal/core 6.5.3 → 6.7.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.
Files changed (163) hide show
  1. package/README.md +4 -4
  2. package/dist/bundle.js +6525 -5562
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/bundle.min.js +18 -18
  5. package/dist/bundle.min.js.map +1 -1
  6. package/dist/esm/CalOptions.d.ts +15 -3
  7. package/dist/esm/DailyLearning.js +1 -1
  8. package/dist/esm/HebrewDateEvent.js +1 -1
  9. package/dist/esm/HolidayEvent.js +7 -6
  10. package/dist/esm/HolidayEvent.js.map +1 -1
  11. package/dist/esm/MevarchimChodeshEvent.js +3 -2
  12. package/dist/esm/MevarchimChodeshEvent.js.map +1 -1
  13. package/dist/esm/ParshaEvent.js +18 -7
  14. package/dist/esm/ParshaEvent.js.map +1 -1
  15. package/dist/esm/TimedEvent.js +1 -1
  16. package/dist/esm/TimedEvent.js.map +1 -1
  17. package/dist/esm/YomKippurKatanEvent.js +3 -2
  18. package/dist/esm/YomKippurKatanEvent.js.map +1 -1
  19. package/dist/esm/ashkenazi.po.js +2 -2
  20. package/dist/esm/ashkenazi.po.js.map +1 -1
  21. package/dist/esm/calendar.js +14 -20
  22. package/dist/esm/calendar.js.map +1 -1
  23. package/dist/esm/candles.d.ts +8 -3
  24. package/dist/esm/candles.js +65 -11
  25. package/dist/esm/candles.js.map +1 -1
  26. package/dist/esm/cities.json.js +1 -1
  27. package/dist/esm/event.js +1 -1
  28. package/dist/esm/getStartAndEnd.js +1 -1
  29. package/dist/esm/hallel.js +1 -1
  30. package/dist/esm/he-x-NoNikud.po.js +1 -1
  31. package/dist/esm/he.po.d.ts +0 -1
  32. package/dist/esm/he.po.js +2 -2
  33. package/dist/esm/he.po.js.map +1 -1
  34. package/dist/esm/hebcal.js +1 -1
  35. package/dist/esm/holidays.js +1 -1
  36. package/dist/esm/holidays.js.map +1 -1
  37. package/dist/esm/index.js +1 -1
  38. package/dist/esm/isAssurBemlacha.js +1 -1
  39. package/dist/esm/isAveilut.js +1 -1
  40. package/dist/esm/isFastDay.js +1 -1
  41. package/dist/esm/locale.js +1 -1
  42. package/dist/esm/location.js +1 -1
  43. package/dist/esm/location.js.map +1 -1
  44. package/dist/esm/modern.js +1 -1
  45. package/dist/esm/molad.d.ts +1 -1
  46. package/dist/esm/molad.js +4 -3
  47. package/dist/esm/molad.js.map +1 -1
  48. package/dist/esm/moladBase.js +1 -1
  49. package/dist/esm/moladDate.d.ts +1 -1
  50. package/dist/esm/moladDate.js +2 -2
  51. package/dist/esm/moladDate.js.map +1 -1
  52. package/dist/esm/omer.js +1 -1
  53. package/dist/esm/parshaName.js +3 -2
  54. package/dist/esm/parshaName.js.map +1 -1
  55. package/dist/esm/parshaYear.js +1 -1
  56. package/dist/esm/pkgVersion.d.ts +1 -1
  57. package/dist/esm/pkgVersion.js +2 -2
  58. package/dist/esm/pkgVersion.js.map +1 -1
  59. package/dist/esm/reformatTimeStr.js +1 -1
  60. package/dist/esm/reformatTimeStr.js.map +1 -1
  61. package/dist/esm/sedra.d.ts +14 -0
  62. package/dist/esm/sedra.js +62 -1
  63. package/dist/esm/sedra.js.map +1 -1
  64. package/dist/esm/sefira.json.js +1 -1
  65. package/dist/esm/staticHolidays.js +1 -1
  66. package/dist/esm/string.d.ts +2 -0
  67. package/dist/esm/string.js +10 -0
  68. package/dist/esm/string.js.map +1 -0
  69. package/dist/esm/tachanun.js +1 -1
  70. package/dist/esm/tachanun.js.map +1 -1
  71. package/dist/esm/zmanim.d.ts +1 -1
  72. package/dist/esm/zmanim.js +3 -4
  73. package/dist/esm/zmanim.js.map +1 -1
  74. package/package.json +18 -21
  75. package/po/ashkenazi.po +1 -12
  76. package/po/he.po +0 -3
  77. package/dist/eslint.config.d.mts +0 -83
  78. package/dist/eslint.config.mjs +0 -29
  79. package/dist/esm/temporal-shim.d.ts +0 -1
  80. package/dist/esm/temporal-shim.js +0 -11
  81. package/dist/esm/temporal-shim.js.map +0 -1
  82. package/dist/po2json.d.ts +0 -1
  83. package/dist/po2json.js +0 -40
  84. package/dist/src/CalOptions.d.ts +0 -171
  85. package/dist/src/CalOptions.js +0 -1
  86. package/dist/src/DailyLearning.d.ts +0 -69
  87. package/dist/src/DailyLearning.js +0 -92
  88. package/dist/src/HebrewDateEvent.d.ts +0 -37
  89. package/dist/src/HebrewDateEvent.js +0 -72
  90. package/dist/src/HolidayEvent.d.ts +0 -117
  91. package/dist/src/HolidayEvent.js +0 -235
  92. package/dist/src/MevarchimChodeshEvent.d.ts +0 -26
  93. package/dist/src/MevarchimChodeshEvent.js +0 -51
  94. package/dist/src/ParshaEvent.d.ts +0 -24
  95. package/dist/src/ParshaEvent.js +0 -49
  96. package/dist/src/TimedEvent.d.ts +0 -76
  97. package/dist/src/TimedEvent.js +0 -134
  98. package/dist/src/YomKippurKatanEvent.d.ts +0 -23
  99. package/dist/src/YomKippurKatanEvent.js +0 -39
  100. package/dist/src/ashkenazi.po.d.ts +0 -84
  101. package/dist/src/ashkenazi.po.js +0 -1
  102. package/dist/src/calendar.d.ts +0 -112
  103. package/dist/src/calendar.js +0 -721
  104. package/dist/src/candles.d.ts +0 -57
  105. package/dist/src/candles.js +0 -185
  106. package/dist/src/cities.json +0 -67
  107. package/dist/src/event.d.ts +0 -233
  108. package/dist/src/event.js +0 -295
  109. package/dist/src/getStartAndEnd.d.ts +0 -6
  110. package/dist/src/getStartAndEnd.js +0 -105
  111. package/dist/src/hallel.d.ts +0 -6
  112. package/dist/src/hallel.js +0 -39
  113. package/dist/src/he-x-NoNikud.po.d.ts +0 -28
  114. package/dist/src/he-x-NoNikud.po.js +0 -1
  115. package/dist/src/he.po.d.ts +0 -218
  116. package/dist/src/he.po.js +0 -1
  117. package/dist/src/hebcal.d.ts +0 -338
  118. package/dist/src/hebcal.js +0 -413
  119. package/dist/src/holidays.d.ts +0 -41
  120. package/dist/src/holidays.js +0 -324
  121. package/dist/src/index.d.ts +0 -30
  122. package/dist/src/index.js +0 -29
  123. package/dist/src/isAssurBemlacha.d.ts +0 -29
  124. package/dist/src/isAssurBemlacha.js +0 -82
  125. package/dist/src/isAveilut.d.ts +0 -22
  126. package/dist/src/isAveilut.js +0 -48
  127. package/dist/src/isFastDay.d.ts +0 -21
  128. package/dist/src/isFastDay.js +0 -31
  129. package/dist/src/locale.d.ts +0 -1
  130. package/dist/src/locale.js +0 -11
  131. package/dist/src/location.d.ts +0 -167
  132. package/dist/src/location.js +0 -342
  133. package/dist/src/modern.d.ts +0 -18
  134. package/dist/src/modern.js +0 -59
  135. package/dist/src/molad.d.ts +0 -164
  136. package/dist/src/molad.js +0 -297
  137. package/dist/src/moladBase.d.ts +0 -15
  138. package/dist/src/moladBase.js +0 -78
  139. package/dist/src/moladDate.d.ts +0 -12
  140. package/dist/src/moladDate.js +0 -58
  141. package/dist/src/omer.d.ts +0 -128
  142. package/dist/src/omer.js +0 -385
  143. package/dist/src/parshaName.d.ts +0 -2
  144. package/dist/src/parshaName.js +0 -12
  145. package/dist/src/parshaYear.d.ts +0 -20
  146. package/dist/src/parshaYear.js +0 -35
  147. package/dist/src/pkgVersion.d.ts +0 -2
  148. package/dist/src/pkgVersion.js +0 -2
  149. package/dist/src/reformatTimeStr.d.ts +0 -8
  150. package/dist/src/reformatTimeStr.js +0 -47
  151. package/dist/src/sedra.d.ts +0 -175
  152. package/dist/src/sedra.js +0 -563
  153. package/dist/src/sefira.json +0 -63
  154. package/dist/src/staticHolidays.d.ts +0 -192
  155. package/dist/src/staticHolidays.js +0 -637
  156. package/dist/src/tachanun.d.ts +0 -29
  157. package/dist/src/tachanun.js +0 -120
  158. package/dist/src/temporal-shim.d.ts +0 -1
  159. package/dist/src/temporal-shim.js +0 -8
  160. package/dist/src/zmanim.d.ts +0 -620
  161. package/dist/src/zmanim.js +0 -1003
  162. package/dist/version.d.ts +0 -1
  163. package/dist/version.js +0 -8
@@ -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 {};