@hebcal/core 5.3.9 → 5.3.11
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 +132 -16
- package/dist/bundle.js +254 -162
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +254 -162
- package/dist/index.mjs +254 -162
- package/hebcal.d.ts +132 -0
- package/package.json +1 -1
- package/po/he.po +3 -0
package/hebcal.d.ts
CHANGED
|
@@ -119,6 +119,9 @@ declare module '@hebcal/core' {
|
|
|
119
119
|
* Gets the Hebrew month (1=NISAN, 7=TISHREI) of this Hebrew date
|
|
120
120
|
*/
|
|
121
121
|
getMonth(): number;
|
|
122
|
+
/**
|
|
123
|
+
* The Tishrei-based month of the date. 1 is Tishrei, 7 is Nisan, 13 is Elul in a leap year
|
|
124
|
+
*/
|
|
122
125
|
getTishreiMonth(): number;
|
|
123
126
|
/**
|
|
124
127
|
* Number of days in the month of this Hebrew date
|
|
@@ -160,12 +163,51 @@ declare module '@hebcal/core' {
|
|
|
160
163
|
*/
|
|
161
164
|
renderGematriya(suppressNikud?: boolean): string;
|
|
162
165
|
|
|
166
|
+
/**
|
|
167
|
+
* Returns an `HDate` representing the a dayNumber before the current date.
|
|
168
|
+
* @example
|
|
169
|
+
* new HDate(new Date('Wednesday February 19, 2014')).before(6).greg() // Sat Feb 15 2014
|
|
170
|
+
* @param {number} day day of week (Sunday=0, Saturday=6)
|
|
171
|
+
*/
|
|
163
172
|
before(day: number): HDate;
|
|
173
|
+
/**
|
|
174
|
+
* Returns an `HDate` representing the a dayNumber on or before the current date.
|
|
175
|
+
* @example
|
|
176
|
+
* new HDate(new Date('Wednesday February 19, 2014')).onOrBefore(6).greg() // Sat Feb 15 2014
|
|
177
|
+
* new HDate(new Date('Saturday February 22, 2014')).onOrBefore(6).greg() // Sat Feb 22 2014
|
|
178
|
+
* new HDate(new Date('Sunday February 23, 2014')).onOrBefore(6).greg() // Sat Feb 22 2014
|
|
179
|
+
* @param {number} day day of week (Sunday=0, Saturday=6)
|
|
180
|
+
*/
|
|
164
181
|
onOrBefore(day: number): HDate;
|
|
182
|
+
/**
|
|
183
|
+
* Returns an `HDate` representing the nearest dayNumber to the current date
|
|
184
|
+
* @example
|
|
185
|
+
* new HDate(new Date('Wednesday February 19, 2014')).nearest(6).greg() // Sat Feb 22 2014
|
|
186
|
+
* new HDate(new Date('Tuesday February 18, 2014')).nearest(6).greg() // Sat Feb 15 2014
|
|
187
|
+
* @param {number} day day of week (Sunday=0, Saturday=6)
|
|
188
|
+
*/
|
|
165
189
|
nearest(day: number): HDate;
|
|
190
|
+
/**
|
|
191
|
+
* Returns an `HDate` representing the a dayNumber on or after the current date.
|
|
192
|
+
* @example
|
|
193
|
+
* new HDate(new Date('Wednesday February 19, 2014')).onOrAfter(6).greg() // Sat Feb 22 2014
|
|
194
|
+
* new HDate(new Date('Saturday February 22, 2014')).onOrAfter(6).greg() // Sat Feb 22 2014
|
|
195
|
+
* new HDate(new Date('Sunday February 23, 2014')).onOrAfter(6).greg() // Sat Mar 01 2014
|
|
196
|
+
* @param {number} day day of week (Sunday=0, Saturday=6)
|
|
197
|
+
*/
|
|
166
198
|
onOrAfter(day: number): HDate;
|
|
199
|
+
/**
|
|
200
|
+
* Returns an `HDate` representing the a dayNumber after the current date.
|
|
201
|
+
* @example
|
|
202
|
+
* new HDate(new Date('Wednesday February 19, 2014')).after(6).greg() // Sat Feb 22 2014
|
|
203
|
+
* new HDate(new Date('Saturday February 22, 2014')).after(6).greg() // Sat Mar 01 2014
|
|
204
|
+
* new HDate(new Date('Sunday February 23, 2014')).after(6).greg() // Sat Mar 01 2014
|
|
205
|
+
* @param {number} day day of week (Sunday=0, Saturday=6)
|
|
206
|
+
*/
|
|
167
207
|
after(day: number): HDate;
|
|
208
|
+
/** Returns the next Hebrew date */
|
|
168
209
|
next(): HDate;
|
|
210
|
+
/** Returns the previous Hebrew date */
|
|
169
211
|
prev(): HDate;
|
|
170
212
|
/**
|
|
171
213
|
* Returns a cloned HDate object with a specified amount of time added
|
|
@@ -188,6 +230,9 @@ declare module '@hebcal/core' {
|
|
|
188
230
|
*/
|
|
189
231
|
deltaDays(other: HDate): number;
|
|
190
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Compares this date to another date, returning `true` if the dates match.
|
|
235
|
+
*/
|
|
191
236
|
isSameDate(other: HDate): boolean;
|
|
192
237
|
|
|
193
238
|
/**
|
|
@@ -268,6 +313,16 @@ declare module '@hebcal/core' {
|
|
|
268
313
|
*/
|
|
269
314
|
static monthFromName(c: string | number): number;
|
|
270
315
|
|
|
316
|
+
/**
|
|
317
|
+
* Note: Applying this function to d+6 gives us the DAYNAME on or after an
|
|
318
|
+
* absolute day d. Similarly, applying it to d+3 gives the DAYNAME nearest to
|
|
319
|
+
* absolute date d, applying it to d-1 gives the DAYNAME previous to absolute
|
|
320
|
+
* date d, and applying it to d+7 gives the DAYNAME following absolute date d.
|
|
321
|
+
* @param {number} dayOfWeek - Day of Week (0=Sunday, 6=Saturday)
|
|
322
|
+
* @param {number} abs - R.D. number of days
|
|
323
|
+
*/
|
|
324
|
+
static dayOnOrBefore(dayOfWeek: number, abs: number): number;
|
|
325
|
+
|
|
271
326
|
/**
|
|
272
327
|
* Construct a new instance of `HDate` from a Gematriya-formatted string
|
|
273
328
|
* @example
|
|
@@ -1226,4 +1281,81 @@ declare module '@hebcal/core' {
|
|
|
1226
1281
|
*/
|
|
1227
1282
|
static lookup(name: string, hd: HDate): Event;
|
|
1228
1283
|
}
|
|
1284
|
+
|
|
1285
|
+
export const enum holidayDesc {
|
|
1286
|
+
ASARA_BTEVET = "Asara B'Tevet",
|
|
1287
|
+
BIRKAT_HACHAMAH = 'Birkat Hachamah',
|
|
1288
|
+
CHAG_HABANOT = 'Chag HaBanot',
|
|
1289
|
+
CHANUKAH_8TH_DAY = 'Chanukah: 8th Day',
|
|
1290
|
+
EREV_TISHA_BAV = "Erev Tish'a B'Av",
|
|
1291
|
+
LEIL_SELICHOT = 'Leil Selichot',
|
|
1292
|
+
PURIM_KATAN = 'Purim Katan',
|
|
1293
|
+
PURIM_MESHULASH = 'Purim Meshulash',
|
|
1294
|
+
SHABBAT_CHAZON = 'Shabbat Chazon',
|
|
1295
|
+
SHABBAT_HACHODESH = 'Shabbat HaChodesh',
|
|
1296
|
+
SHABBAT_HAGADOL = 'Shabbat HaGadol',
|
|
1297
|
+
SHABBAT_NACHAMU = 'Shabbat Nachamu',
|
|
1298
|
+
SHABBAT_PARAH = 'Shabbat Parah',
|
|
1299
|
+
SHABBAT_SHEKALIM = 'Shabbat Shekalim',
|
|
1300
|
+
SHABBAT_SHIRAH = 'Shabbat Shirah',
|
|
1301
|
+
SHABBAT_SHUVA = 'Shabbat Shuva',
|
|
1302
|
+
SHABBAT_ZACHOR = 'Shabbat Zachor',
|
|
1303
|
+
SHUSHAN_PURIM_KATAN = 'Shushan Purim Katan',
|
|
1304
|
+
TAANIT_BECHOROT = "Ta'anit Bechorot",
|
|
1305
|
+
TAANIT_ESTHER = "Ta'anit Esther",
|
|
1306
|
+
TISHA_BAV = "Tish'a B'Av",
|
|
1307
|
+
TZOM_GEDALIAH = 'Tzom Gedaliah',
|
|
1308
|
+
TZOM_TAMMUZ = 'Tzom Tammuz',
|
|
1309
|
+
YOM_HAATZMA_UT = "Yom HaAtzma'ut",
|
|
1310
|
+
YOM_HASHOAH = 'Yom HaShoah',
|
|
1311
|
+
YOM_HAZIKARON = 'Yom HaZikaron',
|
|
1312
|
+
BEN_GURION_DAY = 'Ben-Gurion Day',
|
|
1313
|
+
CHANUKAH_1_CANDLE = 'Chanukah: 1 Candle',
|
|
1314
|
+
EREV_PESACH = 'Erev Pesach',
|
|
1315
|
+
EREV_PURIM = 'Erev Purim',
|
|
1316
|
+
EREV_ROSH_HASHANA = 'Erev Rosh Hashana',
|
|
1317
|
+
EREV_SHAVUOT = 'Erev Shavuot',
|
|
1318
|
+
EREV_SUKKOT = 'Erev Sukkot',
|
|
1319
|
+
EREV_YOM_KIPPUR = 'Erev Yom Kippur',
|
|
1320
|
+
FAMILY_DAY = 'Family Day',
|
|
1321
|
+
HEBREW_LANGUAGE_DAY = 'Hebrew Language Day',
|
|
1322
|
+
HERZL_DAY = 'Herzl Day',
|
|
1323
|
+
JABOTINSKY_DAY = 'Jabotinsky Day',
|
|
1324
|
+
LAG_BAOMER = 'Lag BaOmer',
|
|
1325
|
+
PESACH_I = 'Pesach I',
|
|
1326
|
+
PESACH_II = 'Pesach II',
|
|
1327
|
+
PESACH_III_CHM = "Pesach III (CH''M)",
|
|
1328
|
+
PESACH_II_CHM = "Pesach II (CH''M)",
|
|
1329
|
+
PESACH_IV_CHM = "Pesach IV (CH''M)",
|
|
1330
|
+
PESACH_SHENI = 'Pesach Sheni',
|
|
1331
|
+
PESACH_VII = 'Pesach VII',
|
|
1332
|
+
PESACH_VIII = 'Pesach VIII',
|
|
1333
|
+
PESACH_VI_CHM = "Pesach VI (CH''M)",
|
|
1334
|
+
PESACH_V_CHM = "Pesach V (CH''M)",
|
|
1335
|
+
PURIM = 'Purim',
|
|
1336
|
+
ROSH_HASHANA_II = 'Rosh Hashana II',
|
|
1337
|
+
ROSH_HASHANA_LABEHEMOT = 'Rosh Hashana LaBehemot',
|
|
1338
|
+
SHAVUOT = 'Shavuot',
|
|
1339
|
+
SHAVUOT_I = 'Shavuot I',
|
|
1340
|
+
SHAVUOT_II = 'Shavuot II',
|
|
1341
|
+
SHMINI_ATZERET = 'Shmini Atzeret',
|
|
1342
|
+
SHUSHAN_PURIM = 'Shushan Purim',
|
|
1343
|
+
SIGD = 'Sigd',
|
|
1344
|
+
SIMCHAT_TORAH = 'Simchat Torah',
|
|
1345
|
+
SUKKOT_I = 'Sukkot I',
|
|
1346
|
+
SUKKOT_II = 'Sukkot II',
|
|
1347
|
+
SUKKOT_III_CHM = "Sukkot III (CH''M)",
|
|
1348
|
+
SUKKOT_II_CHM = "Sukkot II (CH''M)",
|
|
1349
|
+
SUKKOT_IV_CHM = "Sukkot IV (CH''M)",
|
|
1350
|
+
SUKKOT_VII_HOSHANA_RABA = 'Sukkot VII (Hoshana Raba)',
|
|
1351
|
+
SUKKOT_VI_CHM = "Sukkot VI (CH''M)",
|
|
1352
|
+
SUKKOT_V_CHM = "Sukkot V (CH''M)",
|
|
1353
|
+
TU_BAV = "Tu B'Av",
|
|
1354
|
+
TU_BISHVAT = 'Tu BiShvat',
|
|
1355
|
+
YITZHAK_RABIN_MEMORIAL_DAY = 'Yitzhak Rabin Memorial Day',
|
|
1356
|
+
YOM_HAALIYAH = 'Yom HaAliyah',
|
|
1357
|
+
YOM_HAALIYAH_SCHOOL_OBSERVANCE = 'Yom HaAliyah School Observance',
|
|
1358
|
+
YOM_KIPPUR = 'Yom Kippur',
|
|
1359
|
+
YOM_YERUSHALAYIM = 'Yom Yerushalayim'
|
|
1360
|
+
}
|
|
1229
1361
|
}
|
package/package.json
CHANGED