@hebcal/core 5.3.8 → 5.3.10
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 +86 -0
- package/dist/bundle.js +319 -103
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +317 -101
- package/dist/index.mjs +317 -102
- package/hebcal.d.ts +55 -0
- package/package.json +2 -2
- package/po/he.po +4 -1
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/core",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.10",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Eyal Schachter (https://github.com/Scimonster)",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
83
83
|
"@rollup/plugin-terser": "^0.4.4",
|
|
84
84
|
"ava": "^6.1.3",
|
|
85
|
-
"core-js": "^3.37.
|
|
85
|
+
"core-js": "^3.37.1",
|
|
86
86
|
"eslint": "^8.57.0",
|
|
87
87
|
"eslint-config-google": "^0.14.0",
|
|
88
88
|
"jsdoc": "^4.0.3",
|
package/po/he.po
CHANGED
|
@@ -790,7 +790,7 @@ msgid "Purim Meshulash"
|
|
|
790
790
|
msgstr "פּוּרִים מְשׁוּלָּשׁ"
|
|
791
791
|
|
|
792
792
|
msgid "after sunset"
|
|
793
|
-
msgstr "
|
|
793
|
+
msgstr "לְאַחַר הַשְׁקִיעָה"
|
|
794
794
|
|
|
795
795
|
msgid "Yerushalmi"
|
|
796
796
|
msgstr "יְרוּשַׁלְמִי"
|
|
@@ -926,3 +926,6 @@ msgstr "מוֹלָד הָלְּבָנָה"
|
|
|
926
926
|
|
|
927
927
|
msgid "chalakim"
|
|
928
928
|
msgstr "חֲלָקִים"
|
|
929
|
+
|
|
930
|
+
msgid "Pirkei Avot"
|
|
931
|
+
msgstr "פִּרְקֵי אָבוֹת"
|