@hebcal/core 5.3.1 → 5.3.3
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/dist/bundle.js +50 -70
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +48 -68
- package/dist/index.mjs +48 -68
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.3.
|
|
1
|
+
/*! @hebcal/core v5.3.3 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
/** @private */
|
|
@@ -1658,10 +1658,16 @@ class HDate {
|
|
|
1658
1658
|
* @return {HDate}
|
|
1659
1659
|
*/
|
|
1660
1660
|
static fromGematriyaString(str, currentThousands = 5000) {
|
|
1661
|
-
const parts = str.split(' ');
|
|
1661
|
+
const parts = str.split(' ').filter(x => x.length !== 0);
|
|
1662
|
+
const numParts = parts.length;
|
|
1663
|
+
if (numParts !== 3 && numParts !== 4) {
|
|
1664
|
+
throw new RangeError(`Unable to parse gematriya string: "${str}"`);
|
|
1665
|
+
}
|
|
1662
1666
|
const day = gematriyaStrToNum(parts[0]);
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1667
|
+
const monthStr = numParts === 3 ? parts[1] : parts[1] + ' ' + parts[2];
|
|
1668
|
+
const month = HDate.monthFromName(monthStr);
|
|
1669
|
+
const yearStr = numParts === 3 ? parts[2] : parts[3];
|
|
1670
|
+
let year = gematriyaStrToNum(yearStr);
|
|
1665
1671
|
if (year < 1000) {
|
|
1666
1672
|
year += currentThousands;
|
|
1667
1673
|
}
|
|
@@ -6104,32 +6110,16 @@ class GeoLocation {
|
|
|
6104
6110
|
* the <code>TimeZone</code> for the location.
|
|
6105
6111
|
*/
|
|
6106
6112
|
constructor(name, latitude, longitude, elevation, timeZoneId) {
|
|
6113
|
+
/**
|
|
6114
|
+
* @private
|
|
6115
|
+
*/
|
|
6116
|
+
this.locationName = null;
|
|
6107
6117
|
this.setLocationName(name);
|
|
6108
6118
|
this.setLatitude(latitude);
|
|
6109
6119
|
this.setLongitude(longitude);
|
|
6110
6120
|
this.setElevation(elevation);
|
|
6111
6121
|
this.setTimeZone(timeZoneId);
|
|
6112
6122
|
}
|
|
6113
|
-
/**
|
|
6114
|
-
* @private
|
|
6115
|
-
*/
|
|
6116
|
-
latitude;
|
|
6117
|
-
/**
|
|
6118
|
-
* @private
|
|
6119
|
-
*/
|
|
6120
|
-
longitude;
|
|
6121
|
-
/**
|
|
6122
|
-
* @private
|
|
6123
|
-
*/
|
|
6124
|
-
locationName = null;
|
|
6125
|
-
/**
|
|
6126
|
-
* @private
|
|
6127
|
-
*/
|
|
6128
|
-
timeZoneId;
|
|
6129
|
-
/**
|
|
6130
|
-
* @private
|
|
6131
|
-
*/
|
|
6132
|
-
elevation;
|
|
6133
6123
|
/**
|
|
6134
6124
|
* Method to get the elevation in Meters.
|
|
6135
6125
|
*
|
|
@@ -6252,39 +6242,6 @@ class NOAACalculator {
|
|
|
6252
6242
|
this.date = date;
|
|
6253
6243
|
this.geoLocation = geoLocation;
|
|
6254
6244
|
}
|
|
6255
|
-
/**
|
|
6256
|
-
* The zenith of astronomical sunrise and sunset. The sun is 90° from the vertical 0°
|
|
6257
|
-
* @private
|
|
6258
|
-
*/
|
|
6259
|
-
static GEOMETRIC_ZENITH = 90;
|
|
6260
|
-
/**
|
|
6261
|
-
* Default value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle that the
|
|
6262
|
-
* center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the Earth
|
|
6263
|
-
* were without an atmosphere, true sunset and sunrise would correspond to a 90° zenith. Because the Sun is not
|
|
6264
|
-
* a point, and because the atmosphere refracts light, this 90° zenith does not, in fact, correspond to true
|
|
6265
|
-
* sunset or sunrise, instead the center of the Sun's disk must lie just below the horizon for the upper edge to be
|
|
6266
|
-
* obscured. This means that a zenith of just above 90° must be used. The Sun subtends an angle of 16 minutes of
|
|
6267
|
-
* arc, and atmospheric refraction accounts for
|
|
6268
|
-
* 34 minutes or so, giving a total of 50
|
|
6269
|
-
* arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333° for true sunrise/sunset.
|
|
6270
|
-
*/
|
|
6271
|
-
// const ZENITH: number = GEOMETRIC_ZENITH + 5.0 / 6.0;
|
|
6272
|
-
/** Sun's zenith at civil twilight (96°). */
|
|
6273
|
-
static CIVIL_ZENITH = 96;
|
|
6274
|
-
/** Sun's zenith at nautical twilight (102°). */
|
|
6275
|
-
static NAUTICAL_ZENITH = 102;
|
|
6276
|
-
/** Sun's zenith at astronomical twilight (108°). */
|
|
6277
|
-
static ASTRONOMICAL_ZENITH = 108;
|
|
6278
|
-
/**
|
|
6279
|
-
* The Java Calendar encapsulated by this class to track the current date used by the class
|
|
6280
|
-
* @private
|
|
6281
|
-
*/
|
|
6282
|
-
date;
|
|
6283
|
-
/**
|
|
6284
|
-
* the {@link GeoLocation} used for calculations.
|
|
6285
|
-
* @private
|
|
6286
|
-
*/
|
|
6287
|
-
geoLocation;
|
|
6288
6245
|
/**
|
|
6289
6246
|
* The getSunrise method Returns a `Date` representing the
|
|
6290
6247
|
* {@link getElevationAdjustment elevation adjusted} sunrise time. The zenith used
|
|
@@ -6634,16 +6591,6 @@ class NOAACalculator {
|
|
|
6634
6591
|
}
|
|
6635
6592
|
return adjustedZenith;
|
|
6636
6593
|
}
|
|
6637
|
-
/**
|
|
6638
|
-
* The <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> of January 1, 2000
|
|
6639
|
-
* @private
|
|
6640
|
-
*/
|
|
6641
|
-
static JULIAN_DAY_JAN_1_2000 = 2451545;
|
|
6642
|
-
/**
|
|
6643
|
-
* Julian days per century
|
|
6644
|
-
* @private
|
|
6645
|
-
*/
|
|
6646
|
-
static JULIAN_DAYS_PER_CENTURY = 36525;
|
|
6647
6594
|
/**
|
|
6648
6595
|
* A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise.
|
|
6649
6596
|
* @param date
|
|
@@ -7183,6 +7130,39 @@ class NOAACalculator {
|
|
|
7183
7130
|
return timeUTC;
|
|
7184
7131
|
}
|
|
7185
7132
|
}
|
|
7133
|
+
/**
|
|
7134
|
+
* The zenith of astronomical sunrise and sunset. The sun is 90° from the vertical 0°
|
|
7135
|
+
* @private
|
|
7136
|
+
*/
|
|
7137
|
+
NOAACalculator.GEOMETRIC_ZENITH = 90;
|
|
7138
|
+
/**
|
|
7139
|
+
* Default value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle that the
|
|
7140
|
+
* center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the Earth
|
|
7141
|
+
* were without an atmosphere, true sunset and sunrise would correspond to a 90° zenith. Because the Sun is not
|
|
7142
|
+
* a point, and because the atmosphere refracts light, this 90° zenith does not, in fact, correspond to true
|
|
7143
|
+
* sunset or sunrise, instead the center of the Sun's disk must lie just below the horizon for the upper edge to be
|
|
7144
|
+
* obscured. This means that a zenith of just above 90° must be used. The Sun subtends an angle of 16 minutes of
|
|
7145
|
+
* arc, and atmospheric refraction accounts for
|
|
7146
|
+
* 34 minutes or so, giving a total of 50
|
|
7147
|
+
* arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333° for true sunrise/sunset.
|
|
7148
|
+
*/
|
|
7149
|
+
// const ZENITH: number = GEOMETRIC_ZENITH + 5.0 / 6.0;
|
|
7150
|
+
/** Sun's zenith at civil twilight (96°). */
|
|
7151
|
+
NOAACalculator.CIVIL_ZENITH = 96;
|
|
7152
|
+
/** Sun's zenith at nautical twilight (102°). */
|
|
7153
|
+
NOAACalculator.NAUTICAL_ZENITH = 102;
|
|
7154
|
+
/** Sun's zenith at astronomical twilight (108°). */
|
|
7155
|
+
NOAACalculator.ASTRONOMICAL_ZENITH = 108;
|
|
7156
|
+
/**
|
|
7157
|
+
* The <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> of January 1, 2000
|
|
7158
|
+
* @private
|
|
7159
|
+
*/
|
|
7160
|
+
NOAACalculator.JULIAN_DAY_JAN_1_2000 = 2451545;
|
|
7161
|
+
/**
|
|
7162
|
+
* Julian days per century
|
|
7163
|
+
* @private
|
|
7164
|
+
*/
|
|
7165
|
+
NOAACalculator.JULIAN_DAYS_PER_CENTURY = 36525;
|
|
7186
7166
|
|
|
7187
7167
|
/*
|
|
7188
7168
|
Hebcal - A Jewish Calendar Generator
|
|
@@ -10375,7 +10355,7 @@ class DailyLearning {
|
|
|
10375
10355
|
}
|
|
10376
10356
|
|
|
10377
10357
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10378
|
-
const version = '5.3.
|
|
10358
|
+
const version = '5.3.3';
|
|
10379
10359
|
|
|
10380
10360
|
const NONE$1 = 0;
|
|
10381
10361
|
const HALF = 1;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.3.
|
|
1
|
+
/*! @hebcal/core v5.3.3 */
|
|
2
2
|
/** @private */
|
|
3
3
|
const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
4
4
|
/** @private */
|
|
@@ -1656,10 +1656,16 @@ class HDate {
|
|
|
1656
1656
|
* @return {HDate}
|
|
1657
1657
|
*/
|
|
1658
1658
|
static fromGematriyaString(str, currentThousands = 5000) {
|
|
1659
|
-
const parts = str.split(' ');
|
|
1659
|
+
const parts = str.split(' ').filter(x => x.length !== 0);
|
|
1660
|
+
const numParts = parts.length;
|
|
1661
|
+
if (numParts !== 3 && numParts !== 4) {
|
|
1662
|
+
throw new RangeError(`Unable to parse gematriya string: "${str}"`);
|
|
1663
|
+
}
|
|
1660
1664
|
const day = gematriyaStrToNum(parts[0]);
|
|
1661
|
-
const
|
|
1662
|
-
|
|
1665
|
+
const monthStr = numParts === 3 ? parts[1] : parts[1] + ' ' + parts[2];
|
|
1666
|
+
const month = HDate.monthFromName(monthStr);
|
|
1667
|
+
const yearStr = numParts === 3 ? parts[2] : parts[3];
|
|
1668
|
+
let year = gematriyaStrToNum(yearStr);
|
|
1663
1669
|
if (year < 1000) {
|
|
1664
1670
|
year += currentThousands;
|
|
1665
1671
|
}
|
|
@@ -6102,32 +6108,16 @@ class GeoLocation {
|
|
|
6102
6108
|
* the <code>TimeZone</code> for the location.
|
|
6103
6109
|
*/
|
|
6104
6110
|
constructor(name, latitude, longitude, elevation, timeZoneId) {
|
|
6111
|
+
/**
|
|
6112
|
+
* @private
|
|
6113
|
+
*/
|
|
6114
|
+
this.locationName = null;
|
|
6105
6115
|
this.setLocationName(name);
|
|
6106
6116
|
this.setLatitude(latitude);
|
|
6107
6117
|
this.setLongitude(longitude);
|
|
6108
6118
|
this.setElevation(elevation);
|
|
6109
6119
|
this.setTimeZone(timeZoneId);
|
|
6110
6120
|
}
|
|
6111
|
-
/**
|
|
6112
|
-
* @private
|
|
6113
|
-
*/
|
|
6114
|
-
latitude;
|
|
6115
|
-
/**
|
|
6116
|
-
* @private
|
|
6117
|
-
*/
|
|
6118
|
-
longitude;
|
|
6119
|
-
/**
|
|
6120
|
-
* @private
|
|
6121
|
-
*/
|
|
6122
|
-
locationName = null;
|
|
6123
|
-
/**
|
|
6124
|
-
* @private
|
|
6125
|
-
*/
|
|
6126
|
-
timeZoneId;
|
|
6127
|
-
/**
|
|
6128
|
-
* @private
|
|
6129
|
-
*/
|
|
6130
|
-
elevation;
|
|
6131
6121
|
/**
|
|
6132
6122
|
* Method to get the elevation in Meters.
|
|
6133
6123
|
*
|
|
@@ -6250,39 +6240,6 @@ class NOAACalculator {
|
|
|
6250
6240
|
this.date = date;
|
|
6251
6241
|
this.geoLocation = geoLocation;
|
|
6252
6242
|
}
|
|
6253
|
-
/**
|
|
6254
|
-
* The zenith of astronomical sunrise and sunset. The sun is 90° from the vertical 0°
|
|
6255
|
-
* @private
|
|
6256
|
-
*/
|
|
6257
|
-
static GEOMETRIC_ZENITH = 90;
|
|
6258
|
-
/**
|
|
6259
|
-
* Default value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle that the
|
|
6260
|
-
* center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the Earth
|
|
6261
|
-
* were without an atmosphere, true sunset and sunrise would correspond to a 90° zenith. Because the Sun is not
|
|
6262
|
-
* a point, and because the atmosphere refracts light, this 90° zenith does not, in fact, correspond to true
|
|
6263
|
-
* sunset or sunrise, instead the center of the Sun's disk must lie just below the horizon for the upper edge to be
|
|
6264
|
-
* obscured. This means that a zenith of just above 90° must be used. The Sun subtends an angle of 16 minutes of
|
|
6265
|
-
* arc, and atmospheric refraction accounts for
|
|
6266
|
-
* 34 minutes or so, giving a total of 50
|
|
6267
|
-
* arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333° for true sunrise/sunset.
|
|
6268
|
-
*/
|
|
6269
|
-
// const ZENITH: number = GEOMETRIC_ZENITH + 5.0 / 6.0;
|
|
6270
|
-
/** Sun's zenith at civil twilight (96°). */
|
|
6271
|
-
static CIVIL_ZENITH = 96;
|
|
6272
|
-
/** Sun's zenith at nautical twilight (102°). */
|
|
6273
|
-
static NAUTICAL_ZENITH = 102;
|
|
6274
|
-
/** Sun's zenith at astronomical twilight (108°). */
|
|
6275
|
-
static ASTRONOMICAL_ZENITH = 108;
|
|
6276
|
-
/**
|
|
6277
|
-
* The Java Calendar encapsulated by this class to track the current date used by the class
|
|
6278
|
-
* @private
|
|
6279
|
-
*/
|
|
6280
|
-
date;
|
|
6281
|
-
/**
|
|
6282
|
-
* the {@link GeoLocation} used for calculations.
|
|
6283
|
-
* @private
|
|
6284
|
-
*/
|
|
6285
|
-
geoLocation;
|
|
6286
6243
|
/**
|
|
6287
6244
|
* The getSunrise method Returns a `Date` representing the
|
|
6288
6245
|
* {@link getElevationAdjustment elevation adjusted} sunrise time. The zenith used
|
|
@@ -6632,16 +6589,6 @@ class NOAACalculator {
|
|
|
6632
6589
|
}
|
|
6633
6590
|
return adjustedZenith;
|
|
6634
6591
|
}
|
|
6635
|
-
/**
|
|
6636
|
-
* The <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> of January 1, 2000
|
|
6637
|
-
* @private
|
|
6638
|
-
*/
|
|
6639
|
-
static JULIAN_DAY_JAN_1_2000 = 2451545;
|
|
6640
|
-
/**
|
|
6641
|
-
* Julian days per century
|
|
6642
|
-
* @private
|
|
6643
|
-
*/
|
|
6644
|
-
static JULIAN_DAYS_PER_CENTURY = 36525;
|
|
6645
6592
|
/**
|
|
6646
6593
|
* A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise.
|
|
6647
6594
|
* @param date
|
|
@@ -7181,6 +7128,39 @@ class NOAACalculator {
|
|
|
7181
7128
|
return timeUTC;
|
|
7182
7129
|
}
|
|
7183
7130
|
}
|
|
7131
|
+
/**
|
|
7132
|
+
* The zenith of astronomical sunrise and sunset. The sun is 90° from the vertical 0°
|
|
7133
|
+
* @private
|
|
7134
|
+
*/
|
|
7135
|
+
NOAACalculator.GEOMETRIC_ZENITH = 90;
|
|
7136
|
+
/**
|
|
7137
|
+
* Default value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle that the
|
|
7138
|
+
* center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the Earth
|
|
7139
|
+
* were without an atmosphere, true sunset and sunrise would correspond to a 90° zenith. Because the Sun is not
|
|
7140
|
+
* a point, and because the atmosphere refracts light, this 90° zenith does not, in fact, correspond to true
|
|
7141
|
+
* sunset or sunrise, instead the center of the Sun's disk must lie just below the horizon for the upper edge to be
|
|
7142
|
+
* obscured. This means that a zenith of just above 90° must be used. The Sun subtends an angle of 16 minutes of
|
|
7143
|
+
* arc, and atmospheric refraction accounts for
|
|
7144
|
+
* 34 minutes or so, giving a total of 50
|
|
7145
|
+
* arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333° for true sunrise/sunset.
|
|
7146
|
+
*/
|
|
7147
|
+
// const ZENITH: number = GEOMETRIC_ZENITH + 5.0 / 6.0;
|
|
7148
|
+
/** Sun's zenith at civil twilight (96°). */
|
|
7149
|
+
NOAACalculator.CIVIL_ZENITH = 96;
|
|
7150
|
+
/** Sun's zenith at nautical twilight (102°). */
|
|
7151
|
+
NOAACalculator.NAUTICAL_ZENITH = 102;
|
|
7152
|
+
/** Sun's zenith at astronomical twilight (108°). */
|
|
7153
|
+
NOAACalculator.ASTRONOMICAL_ZENITH = 108;
|
|
7154
|
+
/**
|
|
7155
|
+
* The <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> of January 1, 2000
|
|
7156
|
+
* @private
|
|
7157
|
+
*/
|
|
7158
|
+
NOAACalculator.JULIAN_DAY_JAN_1_2000 = 2451545;
|
|
7159
|
+
/**
|
|
7160
|
+
* Julian days per century
|
|
7161
|
+
* @private
|
|
7162
|
+
*/
|
|
7163
|
+
NOAACalculator.JULIAN_DAYS_PER_CENTURY = 36525;
|
|
7184
7164
|
|
|
7185
7165
|
/*
|
|
7186
7166
|
Hebcal - A Jewish Calendar Generator
|
|
@@ -10373,7 +10353,7 @@ class DailyLearning {
|
|
|
10373
10353
|
}
|
|
10374
10354
|
|
|
10375
10355
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10376
|
-
const version = '5.3.
|
|
10356
|
+
const version = '5.3.3';
|
|
10377
10357
|
|
|
10378
10358
|
const NONE$1 = 0;
|
|
10379
10359
|
const HALF = 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/core",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.3",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Eyal Schachter (https://github.com/Scimonster)",
|
|
@@ -68,28 +68,28 @@
|
|
|
68
68
|
"verbose": true
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"temporal-polyfill": "^0.2.
|
|
71
|
+
"temporal-polyfill": "^0.2.4"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/core": "^7.24.4",
|
|
75
75
|
"@babel/preset-env": "^7.24.4",
|
|
76
76
|
"@babel/register": "^7.23.7",
|
|
77
77
|
"@hebcal/hdate": "^0.9.1",
|
|
78
|
-
"@hebcal/noaa": "^0.8.
|
|
78
|
+
"@hebcal/noaa": "^0.8.14",
|
|
79
79
|
"@rollup/plugin-babel": "^6.0.4",
|
|
80
80
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
81
81
|
"@rollup/plugin-json": "^6.1.0",
|
|
82
82
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
83
83
|
"@rollup/plugin-terser": "^0.4.4",
|
|
84
84
|
"ava": "^6.1.2",
|
|
85
|
-
"core-js": "^3.
|
|
85
|
+
"core-js": "^3.37.0",
|
|
86
86
|
"eslint": "^8.57.0",
|
|
87
87
|
"eslint-config-google": "^0.14.0",
|
|
88
88
|
"jsdoc": "^4.0.2",
|
|
89
89
|
"jsdoc-to-markdown": "^8.0.1",
|
|
90
90
|
"nyc": "^15.1.0",
|
|
91
91
|
"quick-lru": "^7.0.0",
|
|
92
|
-
"rollup": "^4.
|
|
93
|
-
"ttag-cli": "^1.10.
|
|
92
|
+
"rollup": "^4.16.4",
|
|
93
|
+
"ttag-cli": "^1.10.12"
|
|
94
94
|
}
|
|
95
95
|
}
|