@hebcal/core 6.6.0 → 6.7.0
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 +4 -4
- package/dist/bundle.js +183 -50
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +18 -18
- package/dist/bundle.min.js.map +1 -1
- package/dist/esm/CalOptions.d.ts +15 -3
- package/dist/esm/DailyLearning.js +1 -1
- package/dist/esm/HebrewDateEvent.js +1 -1
- package/dist/esm/HolidayEvent.js +1 -1
- package/dist/esm/MevarchimChodeshEvent.js +1 -1
- package/dist/esm/ParshaEvent.js +16 -6
- package/dist/esm/ParshaEvent.js.map +1 -1
- package/dist/esm/TimedEvent.js +1 -1
- package/dist/esm/TimedEvent.js.map +1 -1
- package/dist/esm/YomKippurKatanEvent.js +1 -1
- package/dist/esm/ashkenazi.po.js +2 -2
- package/dist/esm/ashkenazi.po.js.map +1 -1
- package/dist/esm/calendar.js +14 -20
- package/dist/esm/calendar.js.map +1 -1
- package/dist/esm/candles.d.ts +8 -3
- package/dist/esm/candles.js +65 -11
- package/dist/esm/candles.js.map +1 -1
- package/dist/esm/cities.json.js +1 -1
- package/dist/esm/event.js +1 -1
- package/dist/esm/getStartAndEnd.js +1 -1
- package/dist/esm/hallel.js +1 -1
- package/dist/esm/he-x-NoNikud.po.js +1 -1
- package/dist/esm/he.po.js +1 -1
- package/dist/esm/hebcal.js +1 -1
- package/dist/esm/holidays.js +1 -1
- package/dist/esm/holidays.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/isAssurBemlacha.js +1 -1
- package/dist/esm/isAveilut.js +1 -1
- package/dist/esm/isFastDay.js +1 -1
- package/dist/esm/locale.js +1 -1
- package/dist/esm/location.js +1 -1
- package/dist/esm/location.js.map +1 -1
- package/dist/esm/modern.js +1 -1
- package/dist/esm/molad.js +1 -1
- package/dist/esm/moladBase.js +1 -1
- package/dist/esm/moladDate.js +1 -1
- package/dist/esm/moladDate.js.map +1 -1
- package/dist/esm/omer.js +1 -1
- package/dist/esm/parshaName.js +1 -1
- package/dist/esm/parshaYear.js +1 -1
- package/dist/esm/pkgVersion.d.ts +1 -1
- package/dist/esm/pkgVersion.js +2 -2
- package/dist/esm/pkgVersion.js.map +1 -1
- package/dist/esm/reformatTimeStr.js +1 -1
- package/dist/esm/reformatTimeStr.js.map +1 -1
- package/dist/esm/sedra.d.ts +14 -0
- package/dist/esm/sedra.js +62 -1
- package/dist/esm/sedra.js.map +1 -1
- package/dist/esm/sefira.json.js +1 -1
- package/dist/esm/staticHolidays.js +1 -1
- package/dist/esm/string.js +1 -1
- package/dist/esm/tachanun.js +1 -1
- package/dist/esm/tachanun.js.map +1 -1
- package/dist/esm/zmanim.js +2 -3
- package/dist/esm/zmanim.js.map +1 -1
- package/package.json +14 -17
- package/po/ashkenazi.po +1 -12
- package/dist/eslint.config.d.mts +0 -83
- package/dist/eslint.config.mjs +0 -29
- package/dist/po2json.d.ts +0 -1
- package/dist/po2json.js +0 -40
- package/dist/src/CalOptions.d.ts +0 -171
- package/dist/src/CalOptions.js +0 -1
- package/dist/src/DailyLearning.d.ts +0 -69
- package/dist/src/DailyLearning.js +0 -92
- package/dist/src/HebrewDateEvent.d.ts +0 -37
- package/dist/src/HebrewDateEvent.js +0 -72
- package/dist/src/HolidayEvent.d.ts +0 -117
- package/dist/src/HolidayEvent.js +0 -236
- package/dist/src/MevarchimChodeshEvent.d.ts +0 -26
- package/dist/src/MevarchimChodeshEvent.js +0 -52
- package/dist/src/ParshaEvent.d.ts +0 -24
- package/dist/src/ParshaEvent.js +0 -50
- package/dist/src/TimedEvent.d.ts +0 -76
- package/dist/src/TimedEvent.js +0 -134
- package/dist/src/YomKippurKatanEvent.d.ts +0 -23
- package/dist/src/YomKippurKatanEvent.js +0 -40
- package/dist/src/ashkenazi.po.d.ts +0 -84
- package/dist/src/ashkenazi.po.js +0 -1
- package/dist/src/calendar.d.ts +0 -112
- package/dist/src/calendar.js +0 -721
- package/dist/src/candles.d.ts +0 -57
- package/dist/src/candles.js +0 -185
- package/dist/src/cities.json +0 -67
- package/dist/src/event.d.ts +0 -233
- package/dist/src/event.js +0 -295
- package/dist/src/getStartAndEnd.d.ts +0 -6
- package/dist/src/getStartAndEnd.js +0 -105
- package/dist/src/hallel.d.ts +0 -6
- package/dist/src/hallel.js +0 -39
- package/dist/src/he-x-NoNikud.po.d.ts +0 -28
- package/dist/src/he-x-NoNikud.po.js +0 -1
- package/dist/src/he.po.d.ts +0 -217
- package/dist/src/he.po.js +0 -1
- package/dist/src/hebcal.d.ts +0 -338
- package/dist/src/hebcal.js +0 -413
- package/dist/src/holidays.d.ts +0 -41
- package/dist/src/holidays.js +0 -324
- package/dist/src/index.d.ts +0 -30
- package/dist/src/index.js +0 -29
- package/dist/src/isAssurBemlacha.d.ts +0 -29
- package/dist/src/isAssurBemlacha.js +0 -82
- package/dist/src/isAveilut.d.ts +0 -22
- package/dist/src/isAveilut.js +0 -48
- package/dist/src/isFastDay.d.ts +0 -21
- package/dist/src/isFastDay.js +0 -31
- package/dist/src/locale.d.ts +0 -1
- package/dist/src/locale.js +0 -11
- package/dist/src/location.d.ts +0 -167
- package/dist/src/location.js +0 -342
- package/dist/src/modern.d.ts +0 -18
- package/dist/src/modern.js +0 -59
- package/dist/src/molad.d.ts +0 -164
- package/dist/src/molad.js +0 -298
- package/dist/src/moladBase.d.ts +0 -15
- package/dist/src/moladBase.js +0 -78
- package/dist/src/moladDate.d.ts +0 -12
- package/dist/src/moladDate.js +0 -58
- package/dist/src/omer.d.ts +0 -128
- package/dist/src/omer.js +0 -385
- package/dist/src/parshaName.d.ts +0 -2
- package/dist/src/parshaName.js +0 -13
- package/dist/src/parshaYear.d.ts +0 -20
- package/dist/src/parshaYear.js +0 -35
- package/dist/src/pkgVersion.d.ts +0 -2
- package/dist/src/pkgVersion.js +0 -2
- package/dist/src/reformatTimeStr.d.ts +0 -8
- package/dist/src/reformatTimeStr.js +0 -47
- package/dist/src/sedra.d.ts +0 -175
- package/dist/src/sedra.js +0 -563
- package/dist/src/sefira.json +0 -63
- package/dist/src/staticHolidays.d.ts +0 -192
- package/dist/src/staticHolidays.js +0 -637
- package/dist/src/string.d.ts +0 -2
- package/dist/src/string.js +0 -6
- package/dist/src/tachanun.d.ts +0 -29
- package/dist/src/tachanun.js +0 -120
- package/dist/src/zmanim.d.ts +0 -620
- package/dist/src/zmanim.js +0 -1003
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -8
package/dist/src/candles.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { HDate } from '@hebcal/hdate';
|
|
2
|
-
import { CalOptions } from './CalOptions';
|
|
3
|
-
import { Location } from './location';
|
|
4
|
-
import { Event } from './event';
|
|
5
|
-
import { ChanukahEvent, HolidayEvent } from './HolidayEvent';
|
|
6
|
-
import { TimedEvent } from './TimedEvent';
|
|
7
|
-
/**
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
export declare function makeCandleEvent(ev: Event | undefined, hd: HDate, options: CalOptions, isFriday: boolean, isSaturday: boolean): TimedEvent | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* A fast day holiday with attached start and end time events.
|
|
13
|
-
*
|
|
14
|
-
* Wraps an underlying fast-day {@link HolidayEvent} and (when computable
|
|
15
|
-
* for the given location) exposes a "Fast begins" and "Fast ends"
|
|
16
|
-
* {@link TimedEvent}. Generated by {@link HebrewCalendar.calendar} when
|
|
17
|
-
* `options.candlelighting` is `true` and `options.location` is provided.
|
|
18
|
-
*
|
|
19
|
-
* - Minor fasts begin at *Alot HaShachar* (16.1° below horizon in the morning)
|
|
20
|
-
* and end at tzeit (7.083° by default — overridable via `options.fastEndDeg`).
|
|
21
|
-
* - Tish'a B'Av begins at sunset on the previous day and ends at tzeit.
|
|
22
|
-
* - When a minor fast falls on a Friday, the end time is suppressed
|
|
23
|
-
* (Shabbat begins before nightfall).
|
|
24
|
-
*/
|
|
25
|
-
export declare class FastDayEvent extends HolidayEvent {
|
|
26
|
-
/** original event */
|
|
27
|
-
readonly linkedEvent: HolidayEvent;
|
|
28
|
-
/** this will be a "Fast begins" event */
|
|
29
|
-
readonly startEvent?: TimedEvent;
|
|
30
|
-
/** this will be a "Fast ends" event */
|
|
31
|
-
readonly endEvent?: TimedEvent;
|
|
32
|
-
constructor(linkedEvent: HolidayEvent, startEvent?: TimedEvent, endEvent?: TimedEvent);
|
|
33
|
-
render(locale?: string): string;
|
|
34
|
-
renderBrief(locale?: string): string;
|
|
35
|
-
urlDateSuffix(): string;
|
|
36
|
-
url(): string | undefined;
|
|
37
|
-
getEmoji(): string;
|
|
38
|
-
getCategories(): string[];
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Makes a pair of events representing fast start and end times
|
|
42
|
-
* @private
|
|
43
|
-
*/
|
|
44
|
-
export declare function makeFastStartEnd(ev: HolidayEvent, options: CalOptions): FastDayEvent;
|
|
45
|
-
export declare class TimedChanukahEvent extends ChanukahEvent {
|
|
46
|
-
eventTime: Date;
|
|
47
|
-
eventTimeStr: string;
|
|
48
|
-
readonly location: Location;
|
|
49
|
-
constructor(ev: ChanukahEvent, eventTime: Date, location: Location);
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Makes a candle-lighting event for Chankah (not on Friday/Saturday).
|
|
53
|
-
* At one point this used civil dusk (6 degrees below horizon).
|
|
54
|
-
* Another source suggests 4.6667 degrees below horizon.
|
|
55
|
-
* @private
|
|
56
|
-
*/
|
|
57
|
-
export declare function makeWeekdayChanukahCandleLighting(ev: ChanukahEvent, options: CalOptions): TimedChanukahEvent | null;
|
package/dist/src/candles.js
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { months } from '@hebcal/hdate';
|
|
2
|
-
import { flags } from './event';
|
|
3
|
-
import { ChanukahEvent, HolidayEvent } from './HolidayEvent';
|
|
4
|
-
import { Zmanim } from './zmanim';
|
|
5
|
-
import { TimedEvent, CandleLightingEvent, HavdalahEvent } from './TimedEvent';
|
|
6
|
-
import { holidayDesc as hdesc } from './staticHolidays';
|
|
7
|
-
const LIGHT_CANDLES = flags.LIGHT_CANDLES;
|
|
8
|
-
const LIGHT_CANDLES_TZEIS = flags.LIGHT_CANDLES_TZEIS;
|
|
9
|
-
/**
|
|
10
|
-
* @private
|
|
11
|
-
*/
|
|
12
|
-
export function makeCandleEvent(ev, hd, options, isFriday, isSaturday) {
|
|
13
|
-
let havdalahTitle = false;
|
|
14
|
-
let useHavdalahOffset = isSaturday;
|
|
15
|
-
let mask = ev ? ev.getFlags() : LIGHT_CANDLES;
|
|
16
|
-
if (ev !== undefined) {
|
|
17
|
-
// if linked event && dow == FRI, use Candle lighting time & title
|
|
18
|
-
if (!isFriday) {
|
|
19
|
-
if (mask & (LIGHT_CANDLES_TZEIS | flags.CHANUKAH_CANDLES)) {
|
|
20
|
-
useHavdalahOffset = true;
|
|
21
|
-
}
|
|
22
|
-
else if (mask & flags.YOM_TOV_ENDS) {
|
|
23
|
-
havdalahTitle = true;
|
|
24
|
-
useHavdalahOffset = true;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
else if (isSaturday) {
|
|
29
|
-
havdalahTitle = true;
|
|
30
|
-
mask = LIGHT_CANDLES_TZEIS;
|
|
31
|
-
}
|
|
32
|
-
// if Havdalah offset is 0 or undefined, we'll use tzeit time
|
|
33
|
-
const offset = useHavdalahOffset
|
|
34
|
-
? Number(options.havdalahMins)
|
|
35
|
-
: Number(options.candleLightingMins);
|
|
36
|
-
const location = options.location;
|
|
37
|
-
const useElevation = Boolean(options.useElevation);
|
|
38
|
-
const zmanim = new Zmanim(location, hd, useElevation);
|
|
39
|
-
const time = useHavdalahOffset && !offset
|
|
40
|
-
? zmanim.tzeit(options.havdalahDeg)
|
|
41
|
-
: zmanim.sunsetOffset(offset, true);
|
|
42
|
-
if (isNaN(time.getTime())) {
|
|
43
|
-
return undefined; // no sunset
|
|
44
|
-
}
|
|
45
|
-
if (havdalahTitle) {
|
|
46
|
-
return new HavdalahEvent(hd, mask, time, location, options.havdalahMins, ev, options);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
mask |= LIGHT_CANDLES;
|
|
50
|
-
return new CandleLightingEvent(hd, mask, time, location, ev, options);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const FAST_BEGINS = hdesc.FAST_BEGINS;
|
|
54
|
-
const FAST_ENDS = hdesc.FAST_ENDS;
|
|
55
|
-
/**
|
|
56
|
-
* A fast day holiday with attached start and end time events.
|
|
57
|
-
*
|
|
58
|
-
* Wraps an underlying fast-day {@link HolidayEvent} and (when computable
|
|
59
|
-
* for the given location) exposes a "Fast begins" and "Fast ends"
|
|
60
|
-
* {@link TimedEvent}. Generated by {@link HebrewCalendar.calendar} when
|
|
61
|
-
* `options.candlelighting` is `true` and `options.location` is provided.
|
|
62
|
-
*
|
|
63
|
-
* - Minor fasts begin at *Alot HaShachar* (16.1° below horizon in the morning)
|
|
64
|
-
* and end at tzeit (7.083° by default — overridable via `options.fastEndDeg`).
|
|
65
|
-
* - Tish'a B'Av begins at sunset on the previous day and ends at tzeit.
|
|
66
|
-
* - When a minor fast falls on a Friday, the end time is suppressed
|
|
67
|
-
* (Shabbat begins before nightfall).
|
|
68
|
-
*/
|
|
69
|
-
export class FastDayEvent extends HolidayEvent {
|
|
70
|
-
/** original event */
|
|
71
|
-
linkedEvent;
|
|
72
|
-
/** this will be a "Fast begins" event */
|
|
73
|
-
startEvent;
|
|
74
|
-
/** this will be a "Fast ends" event */
|
|
75
|
-
endEvent;
|
|
76
|
-
constructor(linkedEvent, startEvent, endEvent) {
|
|
77
|
-
super(linkedEvent.getDate(), linkedEvent.getDesc(), linkedEvent.getFlags());
|
|
78
|
-
this.linkedEvent = linkedEvent;
|
|
79
|
-
this.startEvent = startEvent;
|
|
80
|
-
this.endEvent = endEvent;
|
|
81
|
-
}
|
|
82
|
-
render(locale) {
|
|
83
|
-
return this.linkedEvent.render(locale);
|
|
84
|
-
}
|
|
85
|
-
renderBrief(locale) {
|
|
86
|
-
return this.linkedEvent.renderBrief(locale);
|
|
87
|
-
}
|
|
88
|
-
urlDateSuffix() {
|
|
89
|
-
return this.linkedEvent.urlDateSuffix();
|
|
90
|
-
}
|
|
91
|
-
url() {
|
|
92
|
-
return this.linkedEvent.url();
|
|
93
|
-
}
|
|
94
|
-
getEmoji() {
|
|
95
|
-
return this.linkedEvent.getEmoji();
|
|
96
|
-
}
|
|
97
|
-
getCategories() {
|
|
98
|
-
return this.linkedEvent.getCategories();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Makes a pair of events representing fast start and end times
|
|
103
|
-
* @private
|
|
104
|
-
*/
|
|
105
|
-
export function makeFastStartEnd(ev, options) {
|
|
106
|
-
const desc = ev.getDesc();
|
|
107
|
-
if (desc === 'Yom Kippur') {
|
|
108
|
-
throw new RangeError('YK does not require this function');
|
|
109
|
-
}
|
|
110
|
-
const hd = ev.getDate();
|
|
111
|
-
const dt = hd.greg();
|
|
112
|
-
const location = options.location;
|
|
113
|
-
const fastEndDeg = options.fastEndDeg;
|
|
114
|
-
const useElevation = Boolean(options.useElevation);
|
|
115
|
-
const zmanim = new Zmanim(location, dt, useElevation);
|
|
116
|
-
let startEvent;
|
|
117
|
-
let endEvent;
|
|
118
|
-
if (desc === "Erev Tish'a B'Av") {
|
|
119
|
-
const sunset = zmanim.sunset();
|
|
120
|
-
if (!isNaN(sunset.getTime())) {
|
|
121
|
-
startEvent = makeTimedEvent(ev, sunset, FAST_BEGINS, options);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
else if (desc.startsWith("Tish'a B'Av")) {
|
|
125
|
-
const tzeit = zmanim.tzeit(fastEndDeg);
|
|
126
|
-
if (!isNaN(tzeit.getTime())) {
|
|
127
|
-
endEvent = makeTimedEvent(ev, tzeit, FAST_ENDS, options);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
const dawn = zmanim.alotHaShachar();
|
|
132
|
-
if (!isNaN(dawn.getTime())) {
|
|
133
|
-
startEvent = makeTimedEvent(ev, dawn, FAST_BEGINS, options);
|
|
134
|
-
}
|
|
135
|
-
if (dt.getDay() !== 5 &&
|
|
136
|
-
!(hd.getDate() === 14 && hd.getMonth() === months.NISAN)) {
|
|
137
|
-
const tzeit = zmanim.tzeit(fastEndDeg);
|
|
138
|
-
if (!isNaN(tzeit.getTime())) {
|
|
139
|
-
endEvent = makeTimedEvent(ev, tzeit, FAST_ENDS, options);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
const ev2 = new FastDayEvent(ev, startEvent, endEvent);
|
|
144
|
-
// copy properties such as memo or emoji
|
|
145
|
-
Object.assign(ev2, ev);
|
|
146
|
-
return ev2;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* @private
|
|
150
|
-
*/
|
|
151
|
-
function makeTimedEvent(ev, time, desc, options) {
|
|
152
|
-
const location = options.location;
|
|
153
|
-
const hd = ev.getDate();
|
|
154
|
-
return new TimedEvent(hd, desc, ev.getFlags(), time, location, ev, options);
|
|
155
|
-
}
|
|
156
|
-
export class TimedChanukahEvent extends ChanukahEvent {
|
|
157
|
-
eventTime;
|
|
158
|
-
eventTimeStr;
|
|
159
|
-
location;
|
|
160
|
-
constructor(ev, eventTime, location) {
|
|
161
|
-
super(ev.getDate(), ev.getDesc(), ev.getFlags(), ev.chanukahDay);
|
|
162
|
-
this.eventTime = Zmanim.roundTime(eventTime);
|
|
163
|
-
const timeFormat = location.getTimeFormatter();
|
|
164
|
-
this.eventTimeStr = Zmanim.formatTime(this.eventTime, timeFormat);
|
|
165
|
-
this.location = location;
|
|
166
|
-
this.emoji = ev.emoji;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Makes a candle-lighting event for Chankah (not on Friday/Saturday).
|
|
171
|
-
* At one point this used civil dusk (6 degrees below horizon).
|
|
172
|
-
* Another source suggests 4.6667 degrees below horizon.
|
|
173
|
-
* @private
|
|
174
|
-
*/
|
|
175
|
-
export function makeWeekdayChanukahCandleLighting(ev, options) {
|
|
176
|
-
const hd = ev.getDate();
|
|
177
|
-
const location = options.location;
|
|
178
|
-
const useElevation = Boolean(options.useElevation);
|
|
179
|
-
const zmanim = new Zmanim(location, hd.greg(), useElevation);
|
|
180
|
-
const candleLightingTime = zmanim.beinHaShmashos();
|
|
181
|
-
if (isNaN(candleLightingTime.getTime())) {
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
return new TimedChanukahEvent(ev, candleLightingTime, location);
|
|
185
|
-
}
|
package/dist/src/cities.json
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
"Ashdod|IL|31.79213|34.64966|Asia/Jerusalem|27",
|
|
3
|
-
"Atlanta|US|33.749|-84.38798|America/New_York|336",
|
|
4
|
-
"Austin|US|30.26715|-97.74306|America/Chicago|165",
|
|
5
|
-
"Baghdad|IQ|33.34058|44.40088|Asia/Baghdad|41",
|
|
6
|
-
"Beer Sheva|IL|31.25181|34.7913|Asia/Jerusalem|285",
|
|
7
|
-
"Berlin|DE|52.52437|13.41053|Europe/Berlin|43",
|
|
8
|
-
"Baltimore|US|39.29038|-76.61219|America/New_York|35",
|
|
9
|
-
"Bogota|CO|4.60971|-74.08175|America/Bogota|2582",
|
|
10
|
-
"Boston|US|42.35843|-71.05977|America/New_York|38",
|
|
11
|
-
"Budapest|HU|47.49801|19.03991|Europe/Budapest|104",
|
|
12
|
-
"Buenos Aires|AR|-34.61315|-58.37723|America/Argentina/Buenos_Aires|31",
|
|
13
|
-
"Buffalo|US|42.88645|-78.87837|America/New_York|191",
|
|
14
|
-
"Chicago|US|41.85003|-87.65005|America/Chicago|180",
|
|
15
|
-
"Cincinnati|US|39.162|-84.45689|America/New_York|267",
|
|
16
|
-
"Cleveland|US|41.4995|-81.69541|America/New_York|204",
|
|
17
|
-
"Dallas|US|32.78306|-96.80667|America/Chicago|139",
|
|
18
|
-
"Denver|US|39.73915|-104.9847|America/Denver|1636",
|
|
19
|
-
"Detroit|US|42.33143|-83.04575|America/Detroit|192",
|
|
20
|
-
"Eilat|IL|29.55805|34.94821|Asia/Jerusalem|63",
|
|
21
|
-
"Gibraltar|GI|36.14474|-5.35257|Europe/Gibraltar|11",
|
|
22
|
-
"Haifa|IL|32.81841|34.9885|Asia/Jerusalem|40",
|
|
23
|
-
"Hawaii|US|21.30694|-157.85833|Pacific/Honolulu|18",
|
|
24
|
-
"Helsinki|FI|60.16952|24.93545|Europe/Helsinki|26",
|
|
25
|
-
"Houston|US|29.76328|-95.36327|America/Chicago|30",
|
|
26
|
-
"Jerusalem|IL|31.76904|35.21633|Asia/Jerusalem|786",
|
|
27
|
-
"Johannesburg|ZA|-26.20227|28.04363|Africa/Johannesburg|1767",
|
|
28
|
-
"Kiev|UA|50.45466|30.5238|Europe/Kiev|187",
|
|
29
|
-
"La Paz|BO|-16.5|-68.15|America/La_Paz|3782",
|
|
30
|
-
"Livingston|US|40.79593|-74.31487|America/New_York|98",
|
|
31
|
-
"Las Vegas|US|36.17497|-115.13722|America/Los_Angeles|613",
|
|
32
|
-
"London|GB|51.50853|-0.12574|Europe/London|25",
|
|
33
|
-
"Los Angeles|US|34.05223|-118.24368|America/Los_Angeles|96",
|
|
34
|
-
"Marseilles|FR|43.29695|5.38107|Europe/Paris|28",
|
|
35
|
-
"Miami|US|25.77427|-80.19366|America/New_York|25",
|
|
36
|
-
"Minneapolis|US|44.97997|-93.26384|America/Chicago|262",
|
|
37
|
-
"Melbourne|AU|-37.814|144.96332|Australia/Melbourne|25",
|
|
38
|
-
"Mexico City|MX|19.42847|-99.12766|America/Mexico_City|2240",
|
|
39
|
-
"Montreal|CA|45.50884|-73.58781|America/Toronto|216",
|
|
40
|
-
"Moscow|RU|55.75222|37.61556|Europe/Moscow|144",
|
|
41
|
-
"New York|US|40.71427|-74.00597|America/New_York|57",
|
|
42
|
-
"Omaha|US|41.25861|-95.93779|America/Chicago|315",
|
|
43
|
-
"Ottawa|CA|45.41117|-75.69812|America/Toronto|71",
|
|
44
|
-
"Panama City|PA|8.9936|-79.51973|America/Panama|17",
|
|
45
|
-
"Paris|FR|48.85341|2.3488|Europe/Paris|42",
|
|
46
|
-
"Pawtucket|US|41.87871|-71.38256|America/New_York|0",
|
|
47
|
-
"Petach Tikvah|IL|32.08707|34.88747|Asia/Jerusalem|54",
|
|
48
|
-
"Philadelphia|US|39.95233|-75.16379|America/New_York|8",
|
|
49
|
-
"Phoenix|US|33.44838|-112.07404|America/Phoenix|366",
|
|
50
|
-
"Pittsburgh|US|40.44062|-79.99589|America/New_York|239",
|
|
51
|
-
"Providence|US|41.82399|-71.41283|America/New_York|0",
|
|
52
|
-
"Portland|US|45.52345|-122.67621|America/Los_Angeles|15",
|
|
53
|
-
"Saint Louis|US|38.62727|-90.19789|America/Chicago|149",
|
|
54
|
-
"Saint Petersburg|RU|59.93863|30.31413|Europe/Moscow|11",
|
|
55
|
-
"San Diego|US|32.71533|-117.15726|America/Los_Angeles|20",
|
|
56
|
-
"San Francisco|US|37.77493|-122.41942|America/Los_Angeles|28",
|
|
57
|
-
"Sao Paulo|BR|-23.5475|-46.63611|America/Sao_Paulo|769",
|
|
58
|
-
"Seattle|US|47.60621|-122.33207|America/Los_Angeles|56",
|
|
59
|
-
"Sydney|AU|-33.86785|151.20732|Australia/Sydney|58",
|
|
60
|
-
"Tel Aviv|IL|32.08088|34.78057|Asia/Jerusalem|15",
|
|
61
|
-
"Tiberias|IL|32.79221|35.53124|Asia/Jerusalem|0",
|
|
62
|
-
"Toronto|CA|43.70011|-79.4163|America/Toronto|175",
|
|
63
|
-
"Vancouver|CA|49.24966|-123.11934|America/Vancouver|70",
|
|
64
|
-
"White Plains|US|41.03399|-73.76291|America/New_York|82",
|
|
65
|
-
"Washington DC|US|38.89511|-77.03637|America/New_York|6",
|
|
66
|
-
"Worcester|US|42.26259|-71.80229|America/New_York|164"
|
|
67
|
-
]
|
package/dist/src/event.d.ts
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import { HDate } from '@hebcal/hdate';
|
|
2
|
-
import './locale';
|
|
3
|
-
/**
|
|
4
|
-
* Holiday flags for Event. These flags are typically
|
|
5
|
-
* combined using bitwise arithmetic to form a mask.
|
|
6
|
-
* @readonly
|
|
7
|
-
* @enum {number}
|
|
8
|
-
*/
|
|
9
|
-
export declare const flags: {
|
|
10
|
-
/** Chag, yontiff, yom tov */
|
|
11
|
-
readonly CHAG: 1;
|
|
12
|
-
/** Light candles 18 minutes before sundown */
|
|
13
|
-
readonly LIGHT_CANDLES: 2;
|
|
14
|
-
/** End of holiday (end of Yom Tov) */
|
|
15
|
-
readonly YOM_TOV_ENDS: 4;
|
|
16
|
-
/** Observed only in the Diaspora (chutz l'aretz) */
|
|
17
|
-
readonly CHUL_ONLY: 8;
|
|
18
|
-
/** Observed only in Israel */
|
|
19
|
-
readonly IL_ONLY: 16;
|
|
20
|
-
/** Light candles in the evening at Tzeit time (3 small stars) */
|
|
21
|
-
readonly LIGHT_CANDLES_TZEIS: 32;
|
|
22
|
-
/** Candle-lighting for Chanukah */
|
|
23
|
-
readonly CHANUKAH_CANDLES: 64;
|
|
24
|
-
/** Rosh Chodesh, beginning of a new Hebrew month */
|
|
25
|
-
readonly ROSH_CHODESH: 128;
|
|
26
|
-
/** Minor fasts like Tzom Tammuz, Ta'anit Esther, ... */
|
|
27
|
-
readonly MINOR_FAST: 256;
|
|
28
|
-
/** Shabbat Shekalim, Zachor, ... */
|
|
29
|
-
readonly SPECIAL_SHABBAT: 512;
|
|
30
|
-
/** Weekly sedrot on Saturdays */
|
|
31
|
-
readonly PARSHA_HASHAVUA: 1024;
|
|
32
|
-
/** Daily page of Talmud (Bavli) */
|
|
33
|
-
readonly DAF_YOMI: 2048;
|
|
34
|
-
/** Days of the Omer */
|
|
35
|
-
readonly OMER_COUNT: 4096;
|
|
36
|
-
/** Yom HaShoah, Yom HaAtzma'ut, ... */
|
|
37
|
-
readonly MODERN_HOLIDAY: 8192;
|
|
38
|
-
/** Yom Kippur and Tish'a B'Av */
|
|
39
|
-
readonly MAJOR_FAST: 16384;
|
|
40
|
-
/** On the Saturday before Rosh Chodesh */
|
|
41
|
-
readonly SHABBAT_MEVARCHIM: 32768;
|
|
42
|
-
/** Molad */
|
|
43
|
-
readonly MOLAD: 65536;
|
|
44
|
-
/** Yahrzeit or Hebrew Anniversary */
|
|
45
|
-
readonly USER_EVENT: 131072;
|
|
46
|
-
/** Daily Hebrew date ("11th of Sivan, 5780") */
|
|
47
|
-
readonly HEBREW_DATE: 262144;
|
|
48
|
-
/** A holiday that's not major, modern, rosh chodesh, or a fast day */
|
|
49
|
-
readonly MINOR_HOLIDAY: 524288;
|
|
50
|
-
/** Evening before a major or minor holiday */
|
|
51
|
-
readonly EREV: 1048576;
|
|
52
|
-
/** Chol haMoed, intermediate days of Pesach or Sukkot */
|
|
53
|
-
readonly CHOL_HAMOED: 2097152;
|
|
54
|
-
/** Mishna Yomi */
|
|
55
|
-
readonly MISHNA_YOMI: 4194304;
|
|
56
|
-
/** Yom Kippur Katan, minor day of atonement on the day preceeding each Rosh Chodesh */
|
|
57
|
-
readonly YOM_KIPPUR_KATAN: 8388608;
|
|
58
|
-
/** Daily page of Jerusalem Talmud (Yerushalmi) */
|
|
59
|
-
readonly YERUSHALMI_YOMI: 16777216;
|
|
60
|
-
/** Nach Yomi */
|
|
61
|
-
readonly NACH_YOMI: 33554432;
|
|
62
|
-
/** Daily Learning */
|
|
63
|
-
readonly DAILY_LEARNING: 67108864;
|
|
64
|
-
/** Yizkor */
|
|
65
|
-
readonly YIZKOR: 134217728;
|
|
66
|
-
/** BeHaB fast days on Monday, Thursday and Monday after Pesach and Sukkot */
|
|
67
|
-
readonly BEHAB: 268435456;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Represents an Event with a title, date, and flags.
|
|
71
|
-
*
|
|
72
|
-
* Events are used to represent holidays, candle-lighting times,
|
|
73
|
-
* Torah readings, Omer days, Hebrew dates, and more. Most concrete event
|
|
74
|
-
* types are subclasses (e.g. {@link HolidayEvent}, {@link TimedEvent},
|
|
75
|
-
* {@link ParshaEvent}, {@link OmerEvent}) and are produced by
|
|
76
|
-
* {@link HebrewCalendar.calendar}.
|
|
77
|
-
*
|
|
78
|
-
* To get the title of the event in a language other than English with
|
|
79
|
-
* Sephardic transliterations, use the {@link Event.render} method.
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* import {Event, HDate, flags} from '@hebcal/core';
|
|
83
|
-
* const ev = new Event(new HDate(6, 'Sivan', 5749), 'Shavuot', flags.CHAG);
|
|
84
|
-
* ev.getDate().toString(); // '6 Sivan 5749'
|
|
85
|
-
* ev.getDesc(); // 'Shavuot'
|
|
86
|
-
* ev.render('he'); // 'שָׁבוּעוֹת'
|
|
87
|
-
*/
|
|
88
|
-
export declare class Event {
|
|
89
|
-
/** Hebrew date of this event */
|
|
90
|
-
readonly date: HDate;
|
|
91
|
-
/**
|
|
92
|
-
* Untranslated title of this event. Note that these description
|
|
93
|
-
* strings are always in English and will remain stable across releases.
|
|
94
|
-
* To get the title of the event in another language, use the
|
|
95
|
-
* `render()` method.
|
|
96
|
-
*/
|
|
97
|
-
readonly desc: string;
|
|
98
|
-
/** Bitmask of optional event flags. See {@link flags} */
|
|
99
|
-
readonly mask: number;
|
|
100
|
-
/** Optional emoji character such as ✡️, 🕯️, 🕎, 🕍, 🌒 */
|
|
101
|
-
emoji?: string;
|
|
102
|
-
/** Optional longer description or memo text */
|
|
103
|
-
memo?: string;
|
|
104
|
-
/** Alarms are used by iCalendar feeds */
|
|
105
|
-
alarm?: Date | string | boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Constructs Event
|
|
108
|
-
* @param date Hebrew date event occurs
|
|
109
|
-
* @param desc Description (not translated)
|
|
110
|
-
* @param [mask=0] optional bitmask of holiday flags (see {@link flags})
|
|
111
|
-
* @param [attrs={}] optional additional attributes (e.g. `eventTimeStr`, `cholHaMoedDay`)
|
|
112
|
-
*/
|
|
113
|
-
constructor(date: HDate, desc: string, mask?: number, attrs?: object);
|
|
114
|
-
/**
|
|
115
|
-
* Hebrew date of this event
|
|
116
|
-
*/
|
|
117
|
-
getDate(): HDate;
|
|
118
|
-
/**
|
|
119
|
-
* Gregorian date of this event
|
|
120
|
-
*/
|
|
121
|
-
greg(): Date;
|
|
122
|
-
/**
|
|
123
|
-
* Untranslated title of this event. Note that these description
|
|
124
|
-
* strings are always in English and will remain stable across releases.
|
|
125
|
-
* To get the title of the event in another language, use the
|
|
126
|
-
* `render()` method.
|
|
127
|
-
*/
|
|
128
|
-
getDesc(): string;
|
|
129
|
-
/**
|
|
130
|
-
* Bitmask of optional event flags. See {@link flags}
|
|
131
|
-
*/
|
|
132
|
-
getFlags(): number;
|
|
133
|
-
/**
|
|
134
|
-
* Returns (translated) description of this event
|
|
135
|
-
* @example
|
|
136
|
-
* const ev = new Event(new HDate(6, 'Sivan', 5749), 'Shavuot', flags.CHAG);
|
|
137
|
-
* ev.render('en'); // 'Shavuot'
|
|
138
|
-
* ev.render('he'); // 'שָׁבוּעוֹת'
|
|
139
|
-
* ev.render('ashkenazi'); // 'Shavuos'
|
|
140
|
-
* @param [locale] Optional locale name (defaults to empty locale)
|
|
141
|
-
*/
|
|
142
|
-
render(locale?: string): string;
|
|
143
|
-
/**
|
|
144
|
-
* Returns a brief (translated) description of this event.
|
|
145
|
-
*
|
|
146
|
-
* For most events this is the same as {@link render}. Some subclasses
|
|
147
|
-
* (e.g. {@link CandleLightingEvent}, {@link HavdalahEvent},
|
|
148
|
-
* {@link OmerEvent}) produce shorter text without an attached time or
|
|
149
|
-
* extra qualifier — useful for compact UI display.
|
|
150
|
-
* @example
|
|
151
|
-
* import {CandleLightingEvent} from '@hebcal/core';
|
|
152
|
-
* // For a regular Event, renderBrief() == render():
|
|
153
|
-
* const ev = new Event(new HDate(6, 'Sivan', 5749), 'Shavuot', flags.CHAG);
|
|
154
|
-
* ev.renderBrief('en'); // 'Shavuot'
|
|
155
|
-
* @param [locale] Optional locale name (defaults to empty locale)
|
|
156
|
-
*/
|
|
157
|
-
renderBrief(locale?: string): string;
|
|
158
|
-
/**
|
|
159
|
-
* Returns the event's emoji character (e.g. `🕯️`, `🕎`, `🇮🇱`, `🍏🍯`),
|
|
160
|
-
* or `null` if no emoji is associated with this event.
|
|
161
|
-
* Subclasses override this to provide holiday-specific emoji.
|
|
162
|
-
*/
|
|
163
|
-
getEmoji(): string | null;
|
|
164
|
-
/**
|
|
165
|
-
* Returns a simplified (untranslated) description for this event, suitable
|
|
166
|
-
* for grouping related events under a single name.
|
|
167
|
-
*
|
|
168
|
-
* For example, {@link HolidayEvent} strips qualifiers so that
|
|
169
|
-
* `"Erev Pesach"` → `"Pesach"` and `"Sukkot III (CH''M)"` → `"Sukkot"`.
|
|
170
|
-
* For many events the basename and the event description are identical.
|
|
171
|
-
* @example
|
|
172
|
-
* import {HolidayEvent, HDate, months, flags} from '@hebcal/core';
|
|
173
|
-
* const ev = new HolidayEvent(
|
|
174
|
-
* new HDate(14, months.NISAN, 5784), 'Erev Pesach', flags.EREV);
|
|
175
|
-
* ev.getDesc(); // 'Erev Pesach'
|
|
176
|
-
* ev.basename(); // 'Pesach'
|
|
177
|
-
*/
|
|
178
|
-
basename(): string;
|
|
179
|
-
/**
|
|
180
|
-
* Returns a URL to hebcal.com or sefaria.org for more detail on the event,
|
|
181
|
-
* or `undefined` for events with no detail page.
|
|
182
|
-
*
|
|
183
|
-
* Subclasses such as {@link HolidayEvent}, {@link ChanukahEvent},
|
|
184
|
-
* {@link AsaraBTevetEvent}, {@link ParshaEvent}, and {@link OmerEvent}
|
|
185
|
-
* override this with their own URL patterns.
|
|
186
|
-
*/
|
|
187
|
-
url(): string | undefined;
|
|
188
|
-
/**
|
|
189
|
-
* Is this event observed in Israel?
|
|
190
|
-
* @example
|
|
191
|
-
* const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
|
|
192
|
-
* ev1.observedInIsrael(); // false
|
|
193
|
-
* const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
|
|
194
|
-
* ev2.observedInIsrael(); // true
|
|
195
|
-
*/
|
|
196
|
-
observedInIsrael(): boolean;
|
|
197
|
-
/**
|
|
198
|
-
* Is this event observed in the Diaspora?
|
|
199
|
-
* @example
|
|
200
|
-
* const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
|
|
201
|
-
* ev1.observedInDiaspora(); // true
|
|
202
|
-
* const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
|
|
203
|
-
* ev2.observedInDiaspora(); // true
|
|
204
|
-
*/
|
|
205
|
-
observedInDiaspora(): boolean;
|
|
206
|
-
/**
|
|
207
|
-
* Is this event observed in Israel/Diaspora?
|
|
208
|
-
* @example
|
|
209
|
-
* const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
|
|
210
|
-
* ev1.observedIn(false); // true
|
|
211
|
-
* ev1.observedIn(true); // false
|
|
212
|
-
* const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
|
|
213
|
-
* ev2.observedIn(false); // true
|
|
214
|
-
* ev2.observedIn(true); // true
|
|
215
|
-
* @param il
|
|
216
|
-
*/
|
|
217
|
-
observedIn(il: boolean): boolean;
|
|
218
|
-
/**
|
|
219
|
-
* Returns an array of category strings classifying this event, derived
|
|
220
|
-
* from its {@link flags} bitmask. The first element is the broad category
|
|
221
|
-
* (e.g. `'holiday'`, `'roshchodesh'`, `'parashat'`, `'omer'`), followed
|
|
222
|
-
* by zero or more refinements (e.g. `'major'`, `'minor'`, `'fast'`).
|
|
223
|
-
*
|
|
224
|
-
* Returns `['unknown']` if no flag maps to a known category.
|
|
225
|
-
* @example
|
|
226
|
-
* import {Event, HDate, flags} from '@hebcal/core';
|
|
227
|
-
* new Event(new HDate(10, 'Tishrei', 5784), 'Yom Kippur', flags.MAJOR_FAST)
|
|
228
|
-
* .getCategories(); // ['holiday', 'major', 'fast']
|
|
229
|
-
* new Event(new HDate(1, 'Shvat', 5784), 'Rosh Chodesh Sh\'vat', flags.ROSH_CHODESH)
|
|
230
|
-
* .getCategories(); // ['roshchodesh']
|
|
231
|
-
*/
|
|
232
|
-
getCategories(): string[];
|
|
233
|
-
}
|