@hebcal/core
Advanced tools
Comparing version 4.5.1 to 5.0.0-rc1
128
hebcal.d.ts
@@ -1,2 +0,2 @@ | ||
/// <reference types="node"/> | ||
import { GeoLocation } from '@hebcal/noaa'; | ||
@@ -19,4 +19,2 @@ declare module '@hebcal/core' { | ||
getFlags(): number; | ||
/** @deprecated */ | ||
getAttrs(): any; | ||
getDesc(): string; | ||
@@ -287,3 +285,3 @@ basename(): string; | ||
*/ | ||
export class Location { | ||
export class Location extends GeoLocation { | ||
/** | ||
@@ -297,5 +295,6 @@ * Initialize a Location instance | ||
* @param countryCode - ISO 3166 alpha-2 country code (e.g. "FR") | ||
* @param geoid - optional string or numeric geographic ID | ||
* @param [geoid] - optional string or numeric geographic ID | ||
* @param [elevation] - in meters (default `0`) | ||
*/ | ||
constructor(latitude: number, longitude: number, il: boolean, tzid: string, cityName?: string, countryCode?: string, geoid?: string); | ||
constructor(latitude: number, longitude: number, il: boolean, tzid: string, cityName?: string, countryCode?: string, geoid?: string, elevation?: number); | ||
/** | ||
@@ -334,19 +333,3 @@ * Creates a location object from one of 60 "classic" Hebcal city names. | ||
getTimeFormatter(): Intl.DateTimeFormat; | ||
/** @deprecated */ | ||
sunset(hdate: Date | HDate): Date; | ||
/** | ||
* @deprecated | ||
* @param [angle=8.5] optional time for solar depression. | ||
* Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars. | ||
*/ | ||
tzeit(hdate: Date | HDate, angle?: number): Date; | ||
/** | ||
* Builds a city description from geonameid string components | ||
* @deprecated | ||
* @param cityName e.g. 'Tel Aviv' or 'Chicago' | ||
* @param admin1 e.g. 'England' or 'Massachusetts' | ||
* @param countryName full country name, e.g. 'Israel' or 'United States' | ||
*/ | ||
static geonameCityDescr(cityName: string, admin1: string, countryName: string): string; | ||
/** | ||
* Converts timezone info from Zip-Codes.com to a standard Olson tzid. | ||
@@ -374,22 +357,2 @@ * @example | ||
export interface ZmanimTimesResult { | ||
dawn: Date; | ||
dusk: Date; | ||
goldenHour: Date; | ||
goldenHourEnd: Date; | ||
nauticalDawn: Date; | ||
nauticalDusk: Date; | ||
night: Date; | ||
nightEnd: Date; | ||
solarNoon: Date; | ||
sunrise: Date; | ||
sunriseEnd: Date; | ||
sunset: Date; | ||
sunsetStart: Date; | ||
alotHaShachar: Date; | ||
misheyakir: Date; | ||
misheyakirMachmir: Date; | ||
tzeit: Date; | ||
} | ||
/** | ||
@@ -407,8 +370,7 @@ * Calculate halachic times (zmanim / זְמַנִּים) for a given day and location. | ||
* Initialize a Zmanim instance | ||
* @param gloc GeoLocation including latitude, longitude, and timezone | ||
* @param date Regular or Hebrew Date. If `date` is a regular `Date`, | ||
* hours, minutes, seconds and milliseconds are ignored | ||
* @param latitude | ||
* @param longitude | ||
*/ | ||
constructor(date: Date | HDate, latitude: number, longitude: number); | ||
constructor(gloc: GeoLocation, date: Date | HDate); | ||
@@ -438,4 +400,2 @@ /** | ||
/** @deprecated */ | ||
suntime(): ZmanimTimesResult; | ||
/** Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon) */ | ||
@@ -449,8 +409,3 @@ sunrise(): Date; | ||
dusk(): Date; | ||
hour(): number; | ||
hourMins(): number; | ||
gregEve(): Date; | ||
nightHour(): number; | ||
nightHourMins(): number; | ||
hourOffset(hours: number): Date; | ||
/** Midday – Chatzot; Sunrise plus 6 halachic hours */ | ||
@@ -501,14 +456,2 @@ chatzot(): Date; | ||
sunsetOffset(offset: number, roundMinute?: boolean): Date; | ||
/** | ||
* Returns an array with sunset + offset Date object, and a 24-hour string formatted time. | ||
* @deprecated | ||
*/ | ||
sunsetOffsetTime(offset: number, timeFormat: Intl.DateTimeFormat): any[]; | ||
/** | ||
* Returns an array with tzeit Date object and a 24-hour string formatted time. | ||
* @deprecated | ||
* @param angle optional time for solar depression. | ||
* Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars. | ||
*/ | ||
tzeitTime(angle: number, timeFormat: Intl.DateTimeFormat): any[]; | ||
} | ||
@@ -587,14 +530,2 @@ | ||
/** | ||
* A simple Hebrew date | ||
*/ | ||
export type SimpleHebrewDate = { | ||
/** Hebrew year */ | ||
yy: number; | ||
/** Hebrew month of year (1=NISAN, 7=TISHREI) */ | ||
mm: number; | ||
/** Day of month (1-30) */ | ||
dd: number; | ||
}; | ||
export interface DailyLearningOptions { | ||
@@ -889,47 +820,2 @@ [key: string]: any; | ||
/** | ||
* Gregorian date helper functions. | ||
*/ | ||
export class greg { | ||
/** | ||
* Long names of the Gregorian months (1='January', 12='December') | ||
*/ | ||
static monthNames: string[]; | ||
/** | ||
* Returns true if the object is a Javascript Date | ||
*/ | ||
static isDate(obj: any): boolean; | ||
/** | ||
* Returns true if the Gregorian year is a leap year | ||
* @param year - Gregorian year | ||
*/ | ||
static isLeapYear(year: number): boolean; | ||
/** | ||
* Number of days in the Gregorian month for given year | ||
* @param month - Gregorian month (1=January, 12=December) | ||
* @param year - Gregorian year | ||
*/ | ||
static daysInMonth(month: number, year: number): number; | ||
/** | ||
* Returns number of days since January 1 of that year | ||
* @deprecated | ||
* @param date - Gregorian date | ||
*/ | ||
static dayOfYear(date: Date): number; | ||
/** | ||
* Converts Gregorian date to absolute R.D. (Rata Die) days | ||
* @param date - Gregorian date | ||
*/ | ||
static greg2abs(date: Date): number; | ||
/** | ||
* Converts from Rata Die (R.D. number) to Gregorian date. | ||
* See the footnote on page 384 of ``Calendrical Calculations, Part II: | ||
* Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M. | ||
* Clamen, Software--Practice and Experience, Volume 23, Number 4 | ||
* (April, 1993), pages 383-404 for an explanation. | ||
* @param theDate - R.D. number of days | ||
*/ | ||
static abs2greg(theDate: number): Date; | ||
} | ||
/** | ||
* Hebrew months of the year (NISAN=1, TISHREI=7) | ||
@@ -936,0 +822,0 @@ */ |
{ | ||
"name": "@hebcal/core", | ||
"version": "4.5.1", | ||
"version": "5.0.0-rc1", | ||
"author": "Michael J. Radwin (https://github.com/mjradwin)", | ||
@@ -63,6 +63,7 @@ "contributors": [ | ||
"devDependencies": { | ||
"@babel/core": "^7.23.2", | ||
"@babel/preset-env": "^7.23.2", | ||
"@babel/core": "^7.23.3", | ||
"@babel/preset-env": "^7.23.3", | ||
"@babel/register": "^7.22.15", | ||
"@hebcal/solar-calc": "^1.1.2", | ||
"@hebcal/hdate": "^0.8.1", | ||
"@hebcal/noaa": "^0.8.6", | ||
"@rollup/plugin-babel": "^6.0.4", | ||
@@ -74,4 +75,4 @@ "@rollup/plugin-commonjs": "^25.0.7", | ||
"ava": "^5.3.1", | ||
"core-js": "^3.33.2", | ||
"eslint": "^8.53.0", | ||
"core-js": "^3.33.3", | ||
"eslint": "^8.54.0", | ||
"eslint-config-google": "^0.14.0", | ||
@@ -81,5 +82,6 @@ "jsdoc": "^4.0.2", | ||
"nyc": "^15.1.0", | ||
"rollup": "^4.3.0", | ||
"ttag-cli": "^1.10.6" | ||
"rollup": "^4.5.1", | ||
"temporal-polyfill": "^0.1.1", | ||
"ttag-cli": "^1.10.9" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1463147
3524
20
13
27104
2