@hebcal/core 5.4.1 → 5.4.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.
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,41 @@
1
+ import { GeoLocation } from '@hebcal/noaa';
1
2
  /** Class representing Location */
2
- export class Location extends GeoLocation {
3
+ export declare class Location extends GeoLocation {
4
+ private readonly il;
5
+ private readonly cc?;
6
+ private readonly geoid?;
7
+ /**
8
+ * Initialize a Location instance
9
+ * @param {number} latitude - Latitude as a decimal, valid range -90 thru +90 (e.g. 41.85003)
10
+ * @param {number} longitude - Longitude as a decimal, valid range -180 thru +180 (e.g. -87.65005)
11
+ * @param {boolean} il - in Israel (true) or Diaspora (false)
12
+ * @param {string} tzid - Olson timezone ID, e.g. "America/Chicago"
13
+ * @param {string} [cityName] - optional descriptive city name
14
+ * @param {string} [countryCode] - ISO 3166 alpha-2 country code (e.g. "FR")
15
+ * @param {string|number} [geoid] - optional string or numeric geographic ID
16
+ * @param {number} [elevation] - in meters (default `0`)
17
+ */
18
+ constructor(latitude: number, longitude: number, il: boolean, tzid: string, cityName?: string, countryCode?: string, geoid?: string | number, elevation?: number);
19
+ /** @return {boolean} */
20
+ getIsrael(): boolean;
21
+ /** @return {string | null} */
22
+ getName(): string | null;
23
+ /**
24
+ * Returns the location name, up to the first comma
25
+ * @return {string | null}
26
+ */
27
+ getShortName(): string | null;
28
+ /** @return {string | undefined} */
29
+ getCountryCode(): string | undefined;
30
+ /** @return {string} */
31
+ getTzid(): string;
32
+ /**
33
+ * Gets a 24-hour time formatter (e.g. 07:41 or 20:03) for this location
34
+ * @return {Intl.DateTimeFormat}
35
+ */
36
+ getTimeFormatter(): Intl.DateTimeFormat;
37
+ /** @return {string | number | undefined} */
38
+ getGeoId(): string | number | undefined;
3
39
  /**
4
40
  * Creates a location object from one of 60 "classic" Hebcal city names.
5
41
  * The following city names are supported:
@@ -17,16 +53,18 @@ export class Location extends GeoLocation {
17
53
  * 'Tel Aviv', 'Tiberias', 'Toronto', 'Vancouver', 'White Plains',
18
54
  * 'Washington DC', 'Worcester'
19
55
  * @param {string} name
20
- * @return {Location}
56
+ * @return {Location|undefined}
21
57
  */
22
- static lookup(name: string): Location;
58
+ static lookup(name: string): Location | undefined;
59
+ /** @return {string} */
60
+ toString(): string;
23
61
  /**
24
62
  * Converts legacy Hebcal timezone to a standard Olson tzid.
25
63
  * @param {number} tz integer, GMT offset in hours
26
64
  * @param {string} dst 'none', 'eu', 'usa', or 'israel'
27
- * @return {string}
65
+ * @return {string | undefined}
28
66
  */
29
- static legacyTzToTzid(tz: number, dst: string): string;
67
+ static legacyTzToTzid(tz: number, dst: string): string | undefined;
30
68
  /**
31
69
  * Converts timezone info from Zip-Codes.com to a standard Olson tzid.
32
70
  * @example
@@ -46,40 +84,4 @@ export class Location extends GeoLocation {
46
84
  * @return {boolean}
47
85
  */
48
86
  static addLocation(cityName: string, location: Location): boolean;
49
- /**
50
- * Initialize a Location instance
51
- * @param {number} latitude - Latitude as a decimal, valid range -90 thru +90 (e.g. 41.85003)
52
- * @param {number} longitude - Longitude as a decimal, valid range -180 thru +180 (e.g. -87.65005)
53
- * @param {boolean} il - in Israel (true) or Diaspora (false)
54
- * @param {string} tzid - Olson timezone ID, e.g. "America/Chicago"
55
- * @param {string} [cityName] - optional descriptive city name
56
- * @param {string} [countryCode] - ISO 3166 alpha-2 country code (e.g. "FR")
57
- * @param {string} [geoid] - optional string or numeric geographic ID
58
- * @param {number} [elevation] - in meters (default `0`)
59
- */
60
- constructor(latitude: number, longitude: number, il: boolean, tzid: string, cityName?: string | undefined, countryCode?: string | undefined, geoid?: string | undefined, elevation?: number | undefined);
61
- il: boolean;
62
- cc: string | undefined;
63
- geoid: string | undefined;
64
- /** @return {boolean} */
65
- getIsrael(): boolean;
66
- /** @return {string} */
67
- getName(): string;
68
- /**
69
- * Returns the location name, up to the first comma
70
- * @return {string}
71
- */
72
- getShortName(): string;
73
- /** @return {string} */
74
- getCountryCode(): string;
75
- /** @return {string} */
76
- getTzid(): string;
77
- /**
78
- * Gets a 24-hour time formatter (e.g. 07:41 or 20:03) for this location
79
- * @return {Intl.DateTimeFormat}
80
- */
81
- getTimeFormatter(): Intl.DateTimeFormat;
82
- /** @return {string} */
83
- getGeoId(): string;
84
87
  }
85
- import { GeoLocation } from '@hebcal/noaa';
package/dist/molad.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Event } from './event';
2
2
  import { CalOptions } from './CalOptions';
3
3
  import { HDate } from '@hebcal/hdate';
4
+ import './locale';
4
5
  /**
5
6
  * Represents a molad, the moment when the new moon is "born"
6
7
  */
package/dist/omer.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { HDate } from '@hebcal/hdate';
2
2
  import { Event } from './event';
3
+ import './locale';
3
4
  /** Represents a day 1-49 of counting the Omer from Pesach to Shavuot */
4
5
  export declare class OmerEvent extends Event {
5
6
  private readonly weekNumber;
@@ -1 +1,2 @@
1
- export const version: "5.4.1";
1
+ /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
2
+ export declare const version = "5.4.3";
package/dist/sedra.d.ts CHANGED
@@ -1,4 +1,95 @@
1
- import { Sedra } from '@hebcal/hdate';
1
+ import { HDate } from '@hebcal/hdate';
2
+ import './locale';
3
+ /** The result from `Sedra.lookup()` */
4
+ export type SedraResult = {
5
+ /**
6
+ * Name of the parsha (or parshiyot) read on
7
+ * Hebrew date, e.g. `['Noach']` or `['Matot', 'Masei']`
8
+ */
9
+ parsha: string[];
10
+ /**
11
+ * True if this is a regular parasha HaShavua
12
+ * Torah reading, false if it's a special holiday reading
13
+ */
14
+ chag: boolean;
15
+ /**
16
+ * The parsha number (or numbers) using 1-indexing.
17
+ * A `number` for a regular (single) parsha, and a `number[]`
18
+ * for a doubled parsha.
19
+ * For Parashat *Bereshit*, `num` would be equal to `1`, and for
20
+ * *Matot-Masei* it would be `[42, 43]`
21
+ */
22
+ num?: number | number[];
23
+ };
24
+ /**
25
+ * Represents Parashah HaShavua for an entire Hebrew year
26
+ */
27
+ export declare class Sedra {
28
+ private readonly year;
29
+ private readonly il;
30
+ private readonly firstSaturday;
31
+ private readonly theSedraArray;
32
+ /**
33
+ * Caculates the Parashah HaShavua for an entire Hebrew year
34
+ * @param {number} hyear - Hebrew year (e.g. 5749)
35
+ * @param {boolean} il - Use Israel sedra schedule (false for Diaspora)
36
+ */
37
+ constructor(hyear: number, il: boolean);
38
+ /**
39
+ * Returns the parsha (or parshiyot) read on Hebrew date
40
+ * @param {HDate|number} hd Hebrew date or R.D. days
41
+ * @return {string[]}
42
+ */
43
+ get(hd: HDate | number): string[];
44
+ /**
45
+ * Looks up parsha for the date, then returns a translated or transliterated string
46
+ * @param {HDate|number} hd Hebrew date or R.D. days
47
+ * @param {string} [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale
48
+ * @return {string}
49
+ */
50
+ getString(hd: HDate | number, locale?: string): string;
51
+ /**
52
+ * Checks to see if this day would be a regular parasha HaShavua
53
+ * Torah reading or special holiday reading
54
+ * @param {HDate|number} hd Hebrew date or R.D. days
55
+ * @return {boolean}
56
+ */
57
+ isParsha(hd: HDate | number): boolean;
58
+ /**
59
+ * Returns the date that a parsha occurs
60
+ * or `null` if the parsha doesn't occur this year
61
+ * @param {number|string|string[]} parsha
62
+ * @return {HDate|null}
63
+ */
64
+ find(parsha: number | string | string[]): HDate | null;
65
+ /**
66
+ * Returns the underlying annual sedra schedule.
67
+ * Used by `@hebcal/triennial`
68
+ * @return {NumberOrString[]}
69
+ */
70
+ getSedraArray(): NumberOrString[];
71
+ /**
72
+ * R.D. date of the first Saturday on or after Rosh Hashana
73
+ * @return {number}
74
+ */
75
+ getFirstSaturday(): number;
76
+ /** @return {number} */
77
+ getYear(): number;
78
+ /**
79
+ * Returns an object describing the parsha on the first Saturday on or after `hd`
80
+ * @param {HDate|number} hd Hebrew date or R.D. days
81
+ * @return {SedraResult}
82
+ */
83
+ lookup(hd: HDate | number): SedraResult;
84
+ }
85
+ /**
86
+ * The 54 parshiyot of the Torah as transilterated strings
87
+ * parshiot[0] == 'Bereshit', parshiot[1] == 'Noach', parshiot[52] == "Ha'azinu".
88
+ * @readonly
89
+ * @type {string[]}
90
+ */
91
+ export declare const parshiot: string[];
92
+ type NumberOrString = number | string;
2
93
  /**
3
94
  * @private
4
95
  * @param {number} hyear
@@ -6,3 +97,4 @@ import { Sedra } from '@hebcal/hdate';
6
97
  * @return {Sedra}
7
98
  */
8
99
  export declare function getSedra_(hyear: number, il: boolean): Sedra;
100
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/core",
3
- "version": "5.4.1",
3
+ "version": "5.4.3",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "contributors": [
6
6
  "Eyal Schachter (https://github.com/Scimonster)",
@@ -46,9 +46,10 @@
46
46
  ],
47
47
  "scripts": {
48
48
  "build:rollup": "rollup -c",
49
- "build": "npm run version && npm run build:rollup --production",
49
+ "build": "npm run po2json && npm run version && npm run build:rollup --production",
50
50
  "prepublish": "npm run build",
51
- "version": "node ./version.cjs package.json src/pkgVersion.js",
51
+ "version": "node ./version.cjs package.json src/pkgVersion.ts",
52
+ "po2json": "node ./po2json.cjs po/*.po",
52
53
  "readme": "cp dist/index.mjs tmp.js && npx -p jsdoc-to-markdown jsdoc2md tmp.js && rm -f tmp.js",
53
54
  "pretest": "npm run build",
54
55
  "lint": "eslint src",
@@ -56,6 +57,11 @@
56
57
  "test": "jest"
57
58
  },
58
59
  "license": "GPL-2.0",
60
+ "overrides": {
61
+ "babel-plugin-ttag@1.8.16": {
62
+ "babel-plugin-macros": "3.1.0"
63
+ }
64
+ },
59
65
  "peerDependencies": {
60
66
  "temporal-polyfill": "^0.2.4"
61
67
  },
@@ -79,10 +85,11 @@
79
85
  "jsdoc-to-markdown": "^8.0.1",
80
86
  "quick-lru": "^7.0.0",
81
87
  "rollup": "^4.18.0",
88
+ "ttag-cli": "^1.10.12",
82
89
  "typescript": "^5.4.5"
83
90
  },
84
91
  "dependencies": {
85
- "@hebcal/hdate": "^0.9.13",
92
+ "@hebcal/hdate": "^0.10.1",
86
93
  "@hebcal/noaa": "^0.8.14",
87
94
  "tslib": "^2.6.2"
88
95
  }
@@ -0,0 +1,192 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR Danny Sadinoff
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: hebcal 4.2\n"
9
+ "Report-Msgid-Bugs-To: hebcal-bugs@sadinoff.com\n"
10
+ "POT-Creation-Date: 2015-12-30 14:54-0500\n"
11
+ "PO-Revision-Date: 2020-05-03 11:18-0800\n"
12
+ "Language: en_CA@ashkenazi\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=utf-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "Last-Translator: \n"
17
+ "Language-Team: \n"
18
+ "X-Generator: Poedit 1.8.6\n"
19
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
20
+
21
+ #: ../dafyomi.c:27
22
+ msgid "Shabbat"
23
+ msgstr "Shabbos"
24
+
25
+ msgid "Achrei Mot"
26
+ msgstr "Achrei Mos"
27
+
28
+ msgid "Bechukotai"
29
+ msgstr "Bechukosai"
30
+
31
+ msgid "Beha'alotcha"
32
+ msgstr "Beha’aloscha"
33
+
34
+ msgid "Bereshit"
35
+ msgstr "Bereshis"
36
+
37
+ msgid "Chukat"
38
+ msgstr "Chukas"
39
+
40
+ msgid "Erev Shavuot"
41
+ msgstr "Erev Shavuos"
42
+
43
+ msgid "Erev Sukkot"
44
+ msgstr "Erev Sukkos"
45
+
46
+ msgid "Ki Tavo"
47
+ msgstr "Ki Savo"
48
+
49
+ msgid "Ki Teitzei"
50
+ msgstr "Ki Seitzei"
51
+
52
+ msgid "Ki Tisa"
53
+ msgstr "Ki Sisa"
54
+
55
+ msgid "Matot"
56
+ msgstr "Matos"
57
+
58
+ msgid "Purim Katan"
59
+ msgstr "Purim Koton"
60
+
61
+ msgid "Shabbat Chazon"
62
+ msgstr "Shabbos Chazon"
63
+
64
+ msgid "Shabbat HaChodesh"
65
+ msgstr "Shabbos HaChodesh"
66
+
67
+ msgid "Shabbat HaGadol"
68
+ msgstr "Shabbos HaGadol"
69
+
70
+ msgid "Shabbat Nachamu"
71
+ msgstr "Shabbos Nachamu"
72
+
73
+ msgid "Shabbat Parah"
74
+ msgstr "Shabbos Parah"
75
+
76
+ msgid "Shabbat Shekalim"
77
+ msgstr "Shabbos Shekalim"
78
+
79
+ msgid "Shabbat Shuva"
80
+ msgstr "Shabbos Shuvah"
81
+
82
+ msgid "Shabbat Zachor"
83
+ msgstr "Shabbos Zachor"
84
+
85
+ msgid "Shavuot"
86
+ msgstr "Shavuos"
87
+
88
+ msgid "Shavuot I"
89
+ msgstr "Shavuos I"
90
+
91
+ msgid "Shavuot II"
92
+ msgstr "Shavuos II"
93
+
94
+ msgid "Shemot"
95
+ msgstr "Shemos"
96
+
97
+ msgid "Shmini Atzeret"
98
+ msgstr "Shmini Atzeres"
99
+
100
+ msgid "Simchat Torah"
101
+ msgstr "Simchas Torah"
102
+
103
+ msgid "Sukkot"
104
+ msgstr "Sukkos"
105
+
106
+ msgid "Sukkot I"
107
+ msgstr "Sukkos I"
108
+
109
+ msgid "Sukkot II"
110
+ msgstr "Sukkos II"
111
+
112
+ msgid "Sukkot II (CH''M)"
113
+ msgstr "Sukkos II (CH’’M)"
114
+
115
+ msgid "Sukkot III (CH''M)"
116
+ msgstr "Sukkos III (CH’’M)"
117
+
118
+ msgid "Sukkot IV (CH''M)"
119
+ msgstr "Sukkos IV (CH’’M)"
120
+
121
+ msgid "Sukkot V (CH''M)"
122
+ msgstr "Sukkos V (CH’’M)"
123
+
124
+ msgid "Sukkot VI (CH''M)"
125
+ msgstr "Sukkos VI (CH’’M)"
126
+
127
+ msgid "Sukkot VII (Hoshana Raba)"
128
+ msgstr "Sukkos VII (Hoshana Raba)"
129
+
130
+ msgid "Ta'anit Bechorot"
131
+ msgstr "Ta’anis Bechoros"
132
+
133
+ msgid "Ta'anit Esther"
134
+ msgstr "Ta’anis Esther"
135
+
136
+ msgid "Toldot"
137
+ msgstr "Toldos"
138
+
139
+ msgid "Vaetchanan"
140
+ msgstr "Vaeschanan"
141
+
142
+ msgid "Yitro"
143
+ msgstr "Yisro"
144
+
145
+ msgid "Vezot Haberakhah"
146
+ msgstr "Vezos Haberakhah"
147
+
148
+ msgid "Parashat"
149
+ msgstr "Parshas"
150
+
151
+ msgid "Leil Selichot"
152
+ msgstr "Leil Selichos"
153
+
154
+ msgid "Shabbat Mevarchim Chodesh"
155
+ msgstr "Shabbos Mevorchim Chodesh"
156
+
157
+ msgid "Shabbat Shirah"
158
+ msgstr "Shabbos Shirah"
159
+
160
+ msgid "Asara B'Tevet"
161
+ msgstr "Asara B’Teves"
162
+
163
+ # hebcal/hebcal zmanim (unused by hebcal/hebcal-es6)
164
+ msgid "Alot HaShachar"
165
+ msgstr "Alos HaShachar"
166
+
167
+ msgid "Kriat Shema, sof zeman"
168
+ msgstr "Krias Shema, sof zman"
169
+
170
+ msgid "Tefilah, sof zeman"
171
+ msgstr "Tefilah, sof zman"
172
+
173
+ msgid "Kriat Shema, sof zeman (MGA)"
174
+ msgstr "Krias Shema, sof zman (MGA)"
175
+
176
+ msgid "Tefilah, sof zeman (MGA)"
177
+ msgstr "Tefilah, sof zman (MGA)"
178
+
179
+ msgid "Chatzot HaLailah"
180
+ msgstr "Chatzos HaLailah"
181
+
182
+ msgid "Chatzot hayom"
183
+ msgstr "Chatzos"
184
+
185
+ msgid "Tzeit HaKochavim"
186
+ msgstr "Tzeis HaKochavim"
187
+
188
+ msgid "Birkat Hachamah"
189
+ msgstr "Birkas Hachamah"
190
+
191
+ msgid "Shushan Purim Katan"
192
+ msgstr "Shushan Purim Koton"