jcal-zmanim 1.2.4 → 1.2.6
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 +3 -3
- package/dist/README.md +3 -3
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -36
- package/dist/index.d.ts +38 -36
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,39 +1,8 @@
|
|
|
1
|
-
/** Represents a geographic Location. Needed for calculating Zmanim.
|
|
2
|
-
If Israel is undefined, if the given coordinates are near the vicinity of Israel it will be assumed that it is in Israel.
|
|
3
|
-
UTCOffset is the time zone. Israel is always 2 and the US East coast is -5. England is 0 of course.
|
|
4
|
-
If UTCOffset is not specifically supplied, the longitude will be used to get a quasi-educated guess.*/
|
|
5
|
-
declare class Location {
|
|
6
|
-
Name: string;
|
|
7
|
-
NameHebrew?: string;
|
|
8
|
-
Israel: boolean;
|
|
9
|
-
Latitude: number;
|
|
10
|
-
Longitude: number;
|
|
11
|
-
UTCOffset: number;
|
|
12
|
-
Elevation: number;
|
|
13
|
-
CandleLighting?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Describe a new Location.
|
|
16
|
-
* @param {String} name The name of the Location
|
|
17
|
-
* @param {String} nameHeb The name of the Location
|
|
18
|
-
* @param {Boolean} israel Is this Location in Israel?
|
|
19
|
-
* @param {Number} latitude
|
|
20
|
-
* @param {Number} longitude
|
|
21
|
-
* @param {Number} utcOffset The time zone. Israel is 2 and New York is -5.
|
|
22
|
-
* @param {Number} elevation Elevation in meters
|
|
23
|
-
* @param {Number} [candleLighting] Number of minutes before sunset the candles are lit on Friday
|
|
24
|
-
*/
|
|
25
|
-
constructor(name: string, nameHeb: string | undefined, israel: boolean, latitude: number, longitude: number, utcOffset: number, elevation: number, candleLighting?: number);
|
|
26
|
-
static clone(location: Location): Location;
|
|
27
|
-
static getCandles(location: Location): number;
|
|
28
|
-
/**Gets the Location for Jerusalem.*/
|
|
29
|
-
static getJerusalem(): Location;
|
|
30
|
-
/**Gets the Location for Lakewood NJ*/
|
|
31
|
-
static getLakewood(): Location;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
1
|
type Time = { hour: number, minute: number, second?: number };
|
|
35
2
|
type SunTimes = { sunrise?: Time, sunset?: Time };
|
|
36
|
-
type ZmanToShow = { id: number, desc: string, eng: string, heb: string, offset?: number, whichDaysFlags?: number };
|
|
3
|
+
type ZmanToShow = { id: number, desc: string, eng: string, heb: string, offset?: number, whichDaysFlags?: number };
|
|
4
|
+
type ZmanTime$1 = { zmanType: ZmanToShow, time: Time, isTomorrow: boolean; };
|
|
5
|
+
type ShulZmanimType = { chatzosHayom?: Time, chatzosHalayla?: Time, alos?: Time, shkia?: Time };
|
|
37
6
|
|
|
38
7
|
/**
|
|
39
8
|
* Computes the Sedra/Sedras of the week for the given day.
|
|
@@ -98,6 +67,39 @@ declare class Sedra {
|
|
|
98
67
|
};
|
|
99
68
|
}
|
|
100
69
|
|
|
70
|
+
/** Represents a geographic Location. Needed for calculating Zmanim.
|
|
71
|
+
If Israel is undefined, if the given coordinates are near the vicinity of Israel it will be assumed that it is in Israel.
|
|
72
|
+
UTCOffset is the time zone. Israel is always 2 and the US East coast is -5. England is 0 of course.
|
|
73
|
+
If UTCOffset is not specifically supplied, the longitude will be used to get a quasi-educated guess.*/
|
|
74
|
+
declare class Location {
|
|
75
|
+
Name: string;
|
|
76
|
+
NameHebrew?: string;
|
|
77
|
+
Israel: boolean;
|
|
78
|
+
Latitude: number;
|
|
79
|
+
Longitude: number;
|
|
80
|
+
UTCOffset: number;
|
|
81
|
+
Elevation: number;
|
|
82
|
+
CandleLighting?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Describe a new Location.
|
|
85
|
+
* @param {String} name The name of the Location
|
|
86
|
+
* @param {String} nameHeb The name of the Location
|
|
87
|
+
* @param {Boolean} israel Is this Location in Israel?
|
|
88
|
+
* @param {Number} latitude
|
|
89
|
+
* @param {Number} longitude
|
|
90
|
+
* @param {Number} utcOffset The time zone. Israel is 2 and New York is -5.
|
|
91
|
+
* @param {Number} elevation Elevation in meters
|
|
92
|
+
* @param {Number} [candleLighting] Number of minutes before sunset the candles are lit on Friday
|
|
93
|
+
*/
|
|
94
|
+
constructor(name: string, nameHeb: string | undefined, israel: boolean, latitude: number, longitude: number, utcOffset: number, elevation: number, candleLighting?: number);
|
|
95
|
+
static clone(location: Location): Location;
|
|
96
|
+
static getCandles(location: Location): number;
|
|
97
|
+
/**Gets the Location for Jerusalem.*/
|
|
98
|
+
static getJerusalem(): Location;
|
|
99
|
+
/**Gets the Location for Lakewood NJ*/
|
|
100
|
+
static getLakewood(): Location;
|
|
101
|
+
}
|
|
102
|
+
|
|
101
103
|
/** Represents a single day in the Jewish Calendar. */
|
|
102
104
|
declare class jDate {
|
|
103
105
|
Day: number;
|
|
@@ -130,7 +132,7 @@ declare class jDate {
|
|
|
130
132
|
/**Sets the current Jewish date from the given absolute date*/
|
|
131
133
|
fromAbs(absolute: number): void;
|
|
132
134
|
/**Returns a valid javascript Date object that represents the Gregorian date
|
|
133
|
-
|
|
135
|
+
that starts at midnight of the current Jewish date.*/
|
|
134
136
|
getDate(): Date;
|
|
135
137
|
/**
|
|
136
138
|
* @returns {number} The day of the week for the current Jewish date. Sunday is 0 and Shabbos is 6.
|
|
@@ -919,4 +921,4 @@ declare function getNotifications(date: jDate | Date, time: Time, location: Loca
|
|
|
919
921
|
tefillahNotes: string[];
|
|
920
922
|
};
|
|
921
923
|
|
|
922
|
-
export { Dafyomi, DaysOfWeek, DaysOfWeekEng, DaysOfWeekHeb, JewishMonthsEng, JewishMonthsHeb, JewishMonthsNames, Location, Locations, Molad, PirkeiAvos, SecularMonthsEng, Sedra, Utils, ZmanTypeIds, ZmanTypes, Zmanim, ZmanimUtils, closestDistanceMatch, closestNameMatch, findLocation, getNotifications, getZmanType, jDate };
|
|
924
|
+
export { Dafyomi, DaysOfWeek, DaysOfWeekEng, DaysOfWeekHeb, JewishMonthsEng, JewishMonthsHeb, JewishMonthsNames, Location, Locations, Molad, PirkeiAvos, SecularMonthsEng, Sedra, type ShulZmanimType, type SunTimes, type Time, Utils, type ZmanTime$1 as ZmanTime, type ZmanToShow, ZmanTypeIds, ZmanTypes, Zmanim, ZmanimUtils, closestDistanceMatch, closestNameMatch, findLocation, getNotifications, getZmanType, jDate };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,39 +1,8 @@
|
|
|
1
|
-
/** Represents a geographic Location. Needed for calculating Zmanim.
|
|
2
|
-
If Israel is undefined, if the given coordinates are near the vicinity of Israel it will be assumed that it is in Israel.
|
|
3
|
-
UTCOffset is the time zone. Israel is always 2 and the US East coast is -5. England is 0 of course.
|
|
4
|
-
If UTCOffset is not specifically supplied, the longitude will be used to get a quasi-educated guess.*/
|
|
5
|
-
declare class Location {
|
|
6
|
-
Name: string;
|
|
7
|
-
NameHebrew?: string;
|
|
8
|
-
Israel: boolean;
|
|
9
|
-
Latitude: number;
|
|
10
|
-
Longitude: number;
|
|
11
|
-
UTCOffset: number;
|
|
12
|
-
Elevation: number;
|
|
13
|
-
CandleLighting?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Describe a new Location.
|
|
16
|
-
* @param {String} name The name of the Location
|
|
17
|
-
* @param {String} nameHeb The name of the Location
|
|
18
|
-
* @param {Boolean} israel Is this Location in Israel?
|
|
19
|
-
* @param {Number} latitude
|
|
20
|
-
* @param {Number} longitude
|
|
21
|
-
* @param {Number} utcOffset The time zone. Israel is 2 and New York is -5.
|
|
22
|
-
* @param {Number} elevation Elevation in meters
|
|
23
|
-
* @param {Number} [candleLighting] Number of minutes before sunset the candles are lit on Friday
|
|
24
|
-
*/
|
|
25
|
-
constructor(name: string, nameHeb: string | undefined, israel: boolean, latitude: number, longitude: number, utcOffset: number, elevation: number, candleLighting?: number);
|
|
26
|
-
static clone(location: Location): Location;
|
|
27
|
-
static getCandles(location: Location): number;
|
|
28
|
-
/**Gets the Location for Jerusalem.*/
|
|
29
|
-
static getJerusalem(): Location;
|
|
30
|
-
/**Gets the Location for Lakewood NJ*/
|
|
31
|
-
static getLakewood(): Location;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
1
|
type Time = { hour: number, minute: number, second?: number };
|
|
35
2
|
type SunTimes = { sunrise?: Time, sunset?: Time };
|
|
36
|
-
type ZmanToShow = { id: number, desc: string, eng: string, heb: string, offset?: number, whichDaysFlags?: number };
|
|
3
|
+
type ZmanToShow = { id: number, desc: string, eng: string, heb: string, offset?: number, whichDaysFlags?: number };
|
|
4
|
+
type ZmanTime$1 = { zmanType: ZmanToShow, time: Time, isTomorrow: boolean; };
|
|
5
|
+
type ShulZmanimType = { chatzosHayom?: Time, chatzosHalayla?: Time, alos?: Time, shkia?: Time };
|
|
37
6
|
|
|
38
7
|
/**
|
|
39
8
|
* Computes the Sedra/Sedras of the week for the given day.
|
|
@@ -98,6 +67,39 @@ declare class Sedra {
|
|
|
98
67
|
};
|
|
99
68
|
}
|
|
100
69
|
|
|
70
|
+
/** Represents a geographic Location. Needed for calculating Zmanim.
|
|
71
|
+
If Israel is undefined, if the given coordinates are near the vicinity of Israel it will be assumed that it is in Israel.
|
|
72
|
+
UTCOffset is the time zone. Israel is always 2 and the US East coast is -5. England is 0 of course.
|
|
73
|
+
If UTCOffset is not specifically supplied, the longitude will be used to get a quasi-educated guess.*/
|
|
74
|
+
declare class Location {
|
|
75
|
+
Name: string;
|
|
76
|
+
NameHebrew?: string;
|
|
77
|
+
Israel: boolean;
|
|
78
|
+
Latitude: number;
|
|
79
|
+
Longitude: number;
|
|
80
|
+
UTCOffset: number;
|
|
81
|
+
Elevation: number;
|
|
82
|
+
CandleLighting?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Describe a new Location.
|
|
85
|
+
* @param {String} name The name of the Location
|
|
86
|
+
* @param {String} nameHeb The name of the Location
|
|
87
|
+
* @param {Boolean} israel Is this Location in Israel?
|
|
88
|
+
* @param {Number} latitude
|
|
89
|
+
* @param {Number} longitude
|
|
90
|
+
* @param {Number} utcOffset The time zone. Israel is 2 and New York is -5.
|
|
91
|
+
* @param {Number} elevation Elevation in meters
|
|
92
|
+
* @param {Number} [candleLighting] Number of minutes before sunset the candles are lit on Friday
|
|
93
|
+
*/
|
|
94
|
+
constructor(name: string, nameHeb: string | undefined, israel: boolean, latitude: number, longitude: number, utcOffset: number, elevation: number, candleLighting?: number);
|
|
95
|
+
static clone(location: Location): Location;
|
|
96
|
+
static getCandles(location: Location): number;
|
|
97
|
+
/**Gets the Location for Jerusalem.*/
|
|
98
|
+
static getJerusalem(): Location;
|
|
99
|
+
/**Gets the Location for Lakewood NJ*/
|
|
100
|
+
static getLakewood(): Location;
|
|
101
|
+
}
|
|
102
|
+
|
|
101
103
|
/** Represents a single day in the Jewish Calendar. */
|
|
102
104
|
declare class jDate {
|
|
103
105
|
Day: number;
|
|
@@ -130,7 +132,7 @@ declare class jDate {
|
|
|
130
132
|
/**Sets the current Jewish date from the given absolute date*/
|
|
131
133
|
fromAbs(absolute: number): void;
|
|
132
134
|
/**Returns a valid javascript Date object that represents the Gregorian date
|
|
133
|
-
|
|
135
|
+
that starts at midnight of the current Jewish date.*/
|
|
134
136
|
getDate(): Date;
|
|
135
137
|
/**
|
|
136
138
|
* @returns {number} The day of the week for the current Jewish date. Sunday is 0 and Shabbos is 6.
|
|
@@ -919,4 +921,4 @@ declare function getNotifications(date: jDate | Date, time: Time, location: Loca
|
|
|
919
921
|
tefillahNotes: string[];
|
|
920
922
|
};
|
|
921
923
|
|
|
922
|
-
export { Dafyomi, DaysOfWeek, DaysOfWeekEng, DaysOfWeekHeb, JewishMonthsEng, JewishMonthsHeb, JewishMonthsNames, Location, Locations, Molad, PirkeiAvos, SecularMonthsEng, Sedra, Utils, ZmanTypeIds, ZmanTypes, Zmanim, ZmanimUtils, closestDistanceMatch, closestNameMatch, findLocation, getNotifications, getZmanType, jDate };
|
|
924
|
+
export { Dafyomi, DaysOfWeek, DaysOfWeekEng, DaysOfWeekHeb, JewishMonthsEng, JewishMonthsHeb, JewishMonthsNames, Location, Locations, Molad, PirkeiAvos, SecularMonthsEng, Sedra, type ShulZmanimType, type SunTimes, type Time, Utils, type ZmanTime$1 as ZmanTime, type ZmanToShow, ZmanTypeIds, ZmanTypes, Zmanim, ZmanimUtils, closestDistanceMatch, closestNameMatch, findLocation, getNotifications, getZmanType, jDate };
|
package/dist/index.js
CHANGED
|
@@ -470,7 +470,7 @@ var jDate = class _jDate {
|
|
|
470
470
|
this.Abs = absolute;
|
|
471
471
|
}
|
|
472
472
|
/**Returns a valid javascript Date object that represents the Gregorian date
|
|
473
|
-
|
|
473
|
+
that starts at midnight of the current Jewish date.*/
|
|
474
474
|
getDate() {
|
|
475
475
|
return _jDate.sdFromAbs(this.Abs);
|
|
476
476
|
}
|
|
@@ -658,11 +658,11 @@ var jDate = class _jDate {
|
|
|
658
658
|
* @param {boolean} showYear - show the year number?
|
|
659
659
|
*/
|
|
660
660
|
monthName(showYear = true) {
|
|
661
|
-
return JewishMonthsEng[this.Month] + (
|
|
661
|
+
return JewishMonthsEng[this.Month] + (this.Month === 12 && _jDate.isJdLeapY(this.Year) ? " Rishon " : " ") + (showYear ? this.Year.toString() : "");
|
|
662
662
|
}
|
|
663
663
|
/**Returns the current Jewish date in the format: יום חמישי כ"א כסלו תשע"ו.*/
|
|
664
664
|
toStringHeb() {
|
|
665
|
-
return DaysOfWeekHeb[this.getDayOfWeek()] + " " + Utils.toJewishNumber(this.Day) + " " + JewishMonthsHeb[this.Month] + " " + Utils.toJewishNumber(this.Year % 1e3);
|
|
665
|
+
return DaysOfWeekHeb[this.getDayOfWeek()] + " " + Utils.toJewishNumber(this.Day) + " " + JewishMonthsHeb[this.Month] + (this.Month === 12 && _jDate.isJdLeapY(this.Year) ? " \u05E8\u05D0\u05E9\u05D5\u05DF " : " ") + Utils.toJewishNumber(this.Year % 1e3);
|
|
666
666
|
}
|
|
667
667
|
/**Gets the day of the omer for the current Jewish date. If the date is not during sefira, 0 is returned.*/
|
|
668
668
|
getDayOfOmer() {
|