@hebcal/core 5.2.1 → 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/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
 
@@ -280,6 +278,54 @@ declare module '@hebcal/core' {
280
278
  static fromGematriyaString(str: string, currentThousands?: number): HDate;
281
279
  }
282
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
+
283
329
  /**
284
330
  * A Hebcal location is used for Zmanim and a latitude, longitude, timezone, and more
285
331
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/core",
3
- "version": "5.2.1",
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.1.1"
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.11",
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",