@hebcal/core 5.2.0 → 5.2.2
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 +1 -0
- package/dist/bundle.js +9346 -8256
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +3999 -9
- package/dist/index.mjs +3999 -9
- package/hebcal.d.ts +54 -6
- package/package.json +4 -4
package/hebcal.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { GeoLocation } from '@hebcal/noaa';
|
|
2
|
-
|
|
3
1
|
declare module '@hebcal/core' {
|
|
4
2
|
export const version: string;
|
|
5
3
|
|
|
@@ -91,6 +89,8 @@ declare module '@hebcal/core' {
|
|
|
91
89
|
YERUSHALMI_YOMI = 0x1000000,
|
|
92
90
|
/** Nach Yomi */
|
|
93
91
|
NACH_YOMI = 0x2000000,
|
|
92
|
+
/** Daily Learning */
|
|
93
|
+
DAILY_LEARNING = 0x4000000,
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export type UnitTypeShort = 'd' | 'w' | 'M' | 'y';
|
|
@@ -278,6 +278,54 @@ declare module '@hebcal/core' {
|
|
|
278
278
|
static fromGematriyaString(str: string, currentThousands?: number): HDate;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
+
/**
|
|
282
|
+
* A class that contains location information such as latitude and longitude required for astronomical calculations. The
|
|
283
|
+
* elevation field may not be used by some calculation engines and would be ignored if set.
|
|
284
|
+
*
|
|
285
|
+
* @author © Eliyahu Hershfeld 2004 - 2016
|
|
286
|
+
* @version 1.1
|
|
287
|
+
*/
|
|
288
|
+
export class GeoLocation {
|
|
289
|
+
/**
|
|
290
|
+
* GeoLocation constructor with parameters for all required fields.
|
|
291
|
+
*
|
|
292
|
+
* @param name
|
|
293
|
+
* The location name for display use such as "Lakewood, NJ"
|
|
294
|
+
* @param latitude
|
|
295
|
+
* the latitude in a double format such as 40.095965 for Lakewood, NJ.
|
|
296
|
+
* <b>Note: </b> For latitudes south of the equator, a negative value should be used.
|
|
297
|
+
* @param longitude
|
|
298
|
+
* longitude in a double format such as -74.222130 for Lakewood, NJ.
|
|
299
|
+
* <b>Note: </b> For longitudes west of the <a href="http://en.wikipedia.org/wiki/Prime_Meridian">Prime
|
|
300
|
+
* Meridian </a> (Greenwich), a negative value should be used.
|
|
301
|
+
* @param elevation
|
|
302
|
+
* the elevation above sea level in Meters. Elevation is not used in most algorithms used for calculating
|
|
303
|
+
* sunrise and set.
|
|
304
|
+
* @param timeZoneId
|
|
305
|
+
* the <code>TimeZone</code> for the location.
|
|
306
|
+
*/
|
|
307
|
+
constructor(name: string | null, latitude: number, longitude: number, elevation: number, timeZoneId: string);
|
|
308
|
+
/**
|
|
309
|
+
* get the elevation in Meters
|
|
310
|
+
* @return {number} Returns the elevation in Meters
|
|
311
|
+
*/
|
|
312
|
+
getElevation(): number;
|
|
313
|
+
/**
|
|
314
|
+
* set the elevation in Meters <b>above </b> sea level
|
|
315
|
+
* @param elevation
|
|
316
|
+
* The elevation to set in Meters. An Error will be thrown if the value is a negative.
|
|
317
|
+
*/
|
|
318
|
+
setElevation(elevation: number): void;
|
|
319
|
+
setLatitude(latitude: number): void;
|
|
320
|
+
getLatitude(): number;
|
|
321
|
+
setLongitude(longitude: number): void;
|
|
322
|
+
getLongitude(): number;
|
|
323
|
+
getLocationName(): string | null;
|
|
324
|
+
setLocationName(name: string | null): void;
|
|
325
|
+
getTimeZone(): string;
|
|
326
|
+
setTimeZone(timeZoneId: string): void;
|
|
327
|
+
}
|
|
328
|
+
|
|
281
329
|
/**
|
|
282
330
|
* A Hebcal location is used for Zmanim and a latitude, longitude, timezone, and more
|
|
283
331
|
*/
|
|
@@ -504,7 +552,7 @@ declare module '@hebcal/core' {
|
|
|
504
552
|
* @param id - Message ID to translate
|
|
505
553
|
* @param [locale] - Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
|
|
506
554
|
*/
|
|
507
|
-
static lookupTranslation(id: string, locale?: string): string;
|
|
555
|
+
static lookupTranslation(id: string, locale?: string): string | undefined;
|
|
508
556
|
/**
|
|
509
557
|
* By default, if no translation was found, returns `id`.
|
|
510
558
|
* @param id - Message ID to translate
|
|
@@ -707,7 +755,7 @@ declare module '@hebcal/core' {
|
|
|
707
755
|
* @param date - Hebrew Date, Gregorian date, or absolute R.D. day number
|
|
708
756
|
* @param il - use the Israeli schedule for holidays
|
|
709
757
|
*/
|
|
710
|
-
static getHolidaysOnDate(date: HDate | Date | number, il?: boolean): Event[];
|
|
758
|
+
static getHolidaysOnDate(date: HDate | Date | number, il?: boolean): Event[] | undefined;
|
|
711
759
|
|
|
712
760
|
/**
|
|
713
761
|
* Calculates a birthday or anniversary (non-yahrzeit).
|
|
@@ -730,7 +778,7 @@ declare module '@hebcal/core' {
|
|
|
730
778
|
* @param gdate - Gregorian or Hebrew date of event
|
|
731
779
|
* @returns anniversary occurring in hyear
|
|
732
780
|
*/
|
|
733
|
-
static getBirthdayOrAnniversary(hyear: number, gdate: Date | HDate): HDate;
|
|
781
|
+
static getBirthdayOrAnniversary(hyear: number, gdate: Date | HDate): HDate | undefined;
|
|
734
782
|
|
|
735
783
|
/**
|
|
736
784
|
* Calculates yahrzeit.
|
|
@@ -761,7 +809,7 @@ declare module '@hebcal/core' {
|
|
|
761
809
|
* @param gdate - Gregorian or Hebrew date of death
|
|
762
810
|
* @returns anniversary occurring in hyear
|
|
763
811
|
*/
|
|
764
|
-
static getYahrzeit(hyear: number, gdate: Date | HDate): HDate;
|
|
812
|
+
static getYahrzeit(hyear: number, gdate: Date | HDate): HDate | undefined;
|
|
765
813
|
|
|
766
814
|
/**
|
|
767
815
|
* Helper function to format a 23-hour (00:00-23:59) time in US format ("8:13pm") or
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/core",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.2",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Eyal Schachter (https://github.com/Scimonster)",
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
"verbose": true
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"temporal-polyfill": "^0.
|
|
71
|
+
"temporal-polyfill": "^0.2.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/core": "^7.23.9",
|
|
75
75
|
"@babel/preset-env": "^7.23.9",
|
|
76
76
|
"@babel/register": "^7.23.7",
|
|
77
77
|
"@hebcal/hdate": "^0.9.1",
|
|
78
|
-
"@hebcal/noaa": "^0.8.
|
|
78
|
+
"@hebcal/noaa": "^0.8.12",
|
|
79
79
|
"@rollup/plugin-babel": "^6.0.4",
|
|
80
80
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
81
81
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"eslint": "^8.56.0",
|
|
87
87
|
"eslint-config-google": "^0.14.0",
|
|
88
88
|
"jsdoc": "^4.0.2",
|
|
89
|
-
"jsdoc-to-markdown": "^8.0.
|
|
89
|
+
"jsdoc-to-markdown": "^8.0.1",
|
|
90
90
|
"nyc": "^15.1.0",
|
|
91
91
|
"quick-lru": "^7.0.0",
|
|
92
92
|
"rollup": "^4.9.6",
|