@hebcal/core 5.10.1 → 6.0.1

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.
Files changed (88) hide show
  1. package/README.md +2 -2
  2. package/dist/HebrewDateEvent.d.ts +2 -2
  3. package/dist/HolidayEvent.d.ts +9 -10
  4. package/dist/MevarchimChodeshEvent.d.ts +2 -2
  5. package/dist/ParshaEvent.d.ts +4 -10
  6. package/dist/TimedEvent.d.ts +4 -4
  7. package/dist/YomKippurKatanEvent.d.ts +2 -2
  8. package/dist/ashkenazi.po.d.ts +2 -0
  9. package/dist/bundle.js +4438 -6388
  10. package/dist/bundle.js.map +1 -1
  11. package/dist/bundle.min.js +20 -20
  12. package/dist/bundle.min.js.map +1 -1
  13. package/dist/candles.d.ts +2 -2
  14. package/dist/esm/DailyLearning.js +1 -1
  15. package/dist/esm/HebrewDateEvent.d.ts +2 -2
  16. package/dist/esm/HebrewDateEvent.js +5 -5
  17. package/dist/esm/HebrewDateEvent.js.map +1 -1
  18. package/dist/esm/HolidayEvent.d.ts +9 -10
  19. package/dist/esm/HolidayEvent.js +34 -19
  20. package/dist/esm/HolidayEvent.js.map +1 -1
  21. package/dist/esm/MevarchimChodeshEvent.d.ts +2 -2
  22. package/dist/esm/MevarchimChodeshEvent.js +3 -3
  23. package/dist/esm/MevarchimChodeshEvent.js.map +1 -1
  24. package/dist/esm/ParshaEvent.d.ts +4 -10
  25. package/dist/esm/ParshaEvent.js +11 -20
  26. package/dist/esm/ParshaEvent.js.map +1 -1
  27. package/dist/esm/TimedEvent.d.ts +4 -4
  28. package/dist/esm/TimedEvent.js +5 -5
  29. package/dist/esm/TimedEvent.js.map +1 -1
  30. package/dist/esm/YomKippurKatanEvent.d.ts +2 -2
  31. package/dist/esm/YomKippurKatanEvent.js +3 -3
  32. package/dist/esm/YomKippurKatanEvent.js.map +1 -1
  33. package/dist/esm/ashkenazi.po.d.ts +2 -0
  34. package/dist/esm/ashkenazi.po.js +2 -2
  35. package/dist/esm/ashkenazi.po.js.map +1 -1
  36. package/dist/esm/calendar.js +23 -14
  37. package/dist/esm/calendar.js.map +1 -1
  38. package/dist/esm/candles.d.ts +2 -2
  39. package/dist/esm/candles.js +7 -8
  40. package/dist/esm/candles.js.map +1 -1
  41. package/dist/esm/event.d.ts +6 -7
  42. package/dist/esm/event.js +9 -13
  43. package/dist/esm/event.js.map +1 -1
  44. package/dist/esm/getStartAndEnd.js +1 -1
  45. package/dist/esm/hallel.js +1 -1
  46. package/dist/esm/he-x-NoNikud.po.js +1 -1
  47. package/dist/esm/he.po.d.ts +2 -0
  48. package/dist/esm/he.po.js +2 -2
  49. package/dist/esm/he.po.js.map +1 -1
  50. package/dist/esm/hebcal.js +1 -1
  51. package/dist/esm/holidays.js +6 -34
  52. package/dist/esm/holidays.js.map +1 -1
  53. package/dist/esm/index.js +1 -1
  54. package/dist/esm/isAssurBemlacha.js +1 -1
  55. package/dist/esm/locale.js +2 -12
  56. package/dist/esm/locale.js.map +1 -1
  57. package/dist/esm/location.js +1 -1
  58. package/dist/esm/modern.js +1 -1
  59. package/dist/esm/molad.d.ts +2 -2
  60. package/dist/esm/molad.js +4 -4
  61. package/dist/esm/molad.js.map +1 -1
  62. package/dist/esm/omer.d.ts +2 -2
  63. package/dist/esm/omer.js +6 -6
  64. package/dist/esm/omer.js.map +1 -1
  65. package/dist/esm/parshaName.js +2 -2
  66. package/dist/esm/parshaName.js.map +1 -1
  67. package/dist/esm/parshaYear.js +2 -2
  68. package/dist/esm/parshaYear.js.map +1 -1
  69. package/dist/esm/pkgVersion.d.ts +1 -1
  70. package/dist/esm/pkgVersion.js +2 -2
  71. package/dist/esm/pkgVersion.js.map +1 -1
  72. package/dist/esm/reformatTimeStr.js +1 -1
  73. package/dist/esm/sedra.d.ts +2 -20
  74. package/dist/esm/sedra.js +10 -31
  75. package/dist/esm/sedra.js.map +1 -1
  76. package/dist/esm/staticHolidays.js +2 -9
  77. package/dist/esm/staticHolidays.js.map +1 -1
  78. package/dist/esm/tachanun.js +1 -1
  79. package/dist/esm/zmanim.js +1 -1
  80. package/dist/event.d.ts +6 -7
  81. package/dist/he.po.d.ts +2 -0
  82. package/dist/molad.d.ts +2 -2
  83. package/dist/omer.d.ts +2 -2
  84. package/dist/pkgVersion.d.ts +1 -1
  85. package/dist/sedra.d.ts +2 -20
  86. package/package.json +16 -26
  87. package/dist/index.cjs +0 -8378
  88. package/dist/index.cjs.map +0 -1
package/README.md CHANGED
@@ -32,12 +32,12 @@ This package exports 3 categories of output:
32
32
 
33
33
  - `dist/bundle.min.js`: This includes all dependencies in a single JS file. It's quite large (174KB minified), and should only be used if you aren't using a bundler.
34
34
  - `dist/index.cjs`: This includes all of this package's code in a single bundle.
35
- - `dist/es/`: This directory contains ES modules for each source file in the package. If you're using Rollup, Vite, or another bundler, you should import from here to reduce output sizes.
35
+ - `dist/esm/`: This directory contains ES modules for each source file in the package. If you're using Rollup, Vite, or another bundler, you should import from here to reduce output sizes.
36
36
  - These files do not include polyfills; if you want to support older browsers, use <https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers>
37
37
  - To make tree-shaking work better, import from the most specific file possible; avoid importing from `index` or `hebcal`. Some APIs may still need to be moved to specific files. For example:
38
38
 
39
39
  ```ts
40
- import {getHolidaysOnDate} from '@hebcal/core/dist/es/holidays';
40
+ import {getHolidaysOnDate} from '@hebcal/core/dist/esm/holidays';
41
41
  ```
42
42
 
43
43
  - This can save hundreds of kilobytes by dropping Zmanim dependencies if your code doesn't use them.
@@ -8,7 +8,7 @@ export declare class HebrewDateEvent extends Event {
8
8
  */
9
9
  constructor(date: HDate);
10
10
  /**
11
- * @param [locale] Optional locale name (defaults to active locale).
11
+ * @param [locale] Optional locale name (defaults to empty locale)
12
12
  * @example
13
13
  * import {HDate, HebrewDateEvent, months} from '@hebcal/core';
14
14
  *
@@ -24,7 +24,7 @@ export declare class HebrewDateEvent extends Event {
24
24
  */
25
25
  private renderBriefHebrew;
26
26
  /**
27
- * @param [locale] Optional locale name (defaults to active locale).
27
+ * @param [locale] Optional locale name (defaults to empty locale)
28
28
  * @example
29
29
  * import {HDate, HebrewDateEvent, months} from '@hebcal/core';
30
30
  *
@@ -5,7 +5,6 @@ import './locale';
5
5
  export declare class HolidayEvent extends Event {
6
6
  /** During Sukkot or Pesach */
7
7
  cholHaMoedDay?: number;
8
- chanukahDay?: number;
9
8
  /**
10
9
  * `true` if the fast day was postponed a day to avoid Shabbat.
11
10
  * - Tish'a B'Av postponed from the 9th to the 10th
@@ -19,21 +18,16 @@ export declare class HolidayEvent extends Event {
19
18
  getCategories(): string[];
20
19
  /**
21
20
  * Returns (translated) description of this event
22
- * @param [locale] Optional locale name (defaults to active locale).
21
+ * @param [locale] Optional locale name (defaults to empty locale)
23
22
  */
24
23
  render(locale?: string): string;
25
24
  /**
26
25
  * Returns a brief (translated) description of this event.
27
26
  * For most events, this is the same as render(). For some events, it procudes
28
27
  * a shorter text (e.g. without a time or added description).
29
- * @param [locale] Optional locale name (defaults to active locale).
28
+ * @param [locale] Optional locale name (defaults to empty locale)
30
29
  */
31
30
  renderBrief(locale?: string): string;
32
- /**
33
- * Makes a clone of this Event object
34
- * @deprecated
35
- */
36
- clone(): HolidayEvent;
37
31
  }
38
32
  /**
39
33
  * Because Asara B'Tevet often occurs twice in the same Gregorian year,
@@ -47,6 +41,11 @@ export declare class AsaraBTevetEvent extends HolidayEvent {
47
41
  * we subclass HolidayEvent to generate the correct URL.
48
42
  */
49
43
  export declare class ChanukahEvent extends HolidayEvent {
44
+ readonly chanukahDay?: number;
45
+ /**
46
+ * @param chanukahDay should be undefined for 1st night of Chanukah
47
+ */
48
+ constructor(date: HDate, desc: string, mask: number, chanukahDay?: number);
50
49
  urlDateSuffix(): string;
51
50
  }
52
51
  /** Represents Rosh Hashana, the Jewish New Year */
@@ -61,7 +60,7 @@ export declare class RoshHashanaEvent extends HolidayEvent {
61
60
  constructor(date: HDate, hyear: number, mask: number);
62
61
  /**
63
62
  * Returns (translated) description of this event
64
- * @param [locale] Optional locale name (defaults to active locale).
63
+ * @param [locale] Optional locale name (defaults to empty locale)
65
64
  */
66
65
  render(locale?: string): string;
67
66
  getEmoji(): string;
@@ -76,7 +75,7 @@ export declare class RoshChodeshEvent extends HolidayEvent {
76
75
  constructor(date: HDate, monthName: string);
77
76
  /**
78
77
  * Returns (translated) description of this event
79
- * @param [locale] Optional locale name (defaults to active locale).
78
+ * @param [locale] Optional locale name (defaults to empty locale)
80
79
  */
81
80
  render(locale?: string): string;
82
81
  basename(): string;
@@ -15,12 +15,12 @@ export declare class MevarchimChodeshEvent extends Event {
15
15
  basename(): string;
16
16
  /**
17
17
  * Returns (translated) description of this event
18
- * @param [locale] Optional locale name (defaults to active locale).
18
+ * @param [locale] Optional locale name (defaults to empty locale)
19
19
  */
20
20
  render(locale?: string): string;
21
21
  /**
22
22
  * Returns (translated) description of this event
23
- * @param [locale] Optional locale name (defaults to active locale).
23
+ * @param [locale] Optional locale name (defaults to empty locale)
24
24
  */
25
25
  renderBrief(locale?: string): string;
26
26
  }
@@ -1,20 +1,14 @@
1
1
  import { Event } from './event';
2
- import { HDate } from '@hebcal/hdate';
2
+ import { SedraResult } from './sedra';
3
3
  import './locale';
4
4
  /**
5
5
  * Represents one of 54 weekly Torah portions, always on a Saturday
6
6
  */
7
7
  export declare class ParshaEvent extends Event {
8
- readonly parsha: string[];
9
- readonly il: boolean;
10
- readonly num: number | number[];
8
+ readonly p: SedraResult;
9
+ constructor(parsha: SedraResult);
11
10
  /**
12
- * @param parsha - untranslated name of single or double parsha,
13
- * such as ['Bereshit'] or ['Achrei Mot', 'Kedoshim']
14
- */
15
- constructor(date: HDate, parsha: string[], il?: boolean, num?: number | number[]);
16
- /**
17
- * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to active locale.
11
+ * @param [locale] Optional locale name (i.e: `'he'`, `'fr'`). Defaults to empty locale.
18
12
  */
19
13
  render(locale?: string): string;
20
14
  basename(): string;
@@ -15,12 +15,12 @@ export declare class TimedEvent extends Event {
15
15
  */
16
16
  constructor(date: HDate, desc: string, mask: number, eventTime: Date, location: Location, linkedEvent?: Event, options?: CalOptions);
17
17
  /**
18
- * @param [locale] Optional locale name (defaults to active locale).
18
+ * @param [locale] Optional locale name (defaults to empty locale)
19
19
  */
20
20
  render(locale?: string): string;
21
21
  /**
22
22
  * Returns translation of "Candle lighting" without the time.
23
- * @param [locale] Optional locale name (defaults to active locale).
23
+ * @param [locale] Optional locale name (defaults to empty locale)
24
24
  */
25
25
  renderBrief(locale?: string): string;
26
26
  getCategories(): string[];
@@ -35,12 +35,12 @@ export declare class HavdalahEvent extends TimedEvent {
35
35
  private readonly havdalahMins?;
36
36
  constructor(date: HDate, mask: number, eventTime: Date, location: Location, havdalahMins?: number, linkedEvent?: Event, options?: CalOptions);
37
37
  /**
38
- * @param [locale] Optional locale name (defaults to active locale).
38
+ * @param [locale] Optional locale name (defaults to empty locale)
39
39
  */
40
40
  render(locale?: string): string;
41
41
  /**
42
42
  * Returns translation of "Havdalah" without the time.
43
- * @param [locale] Optional locale name (defaults to active locale).
43
+ * @param [locale] Optional locale name (defaults to empty locale)
44
44
  */
45
45
  renderBrief(locale?: string): string;
46
46
  getEmoji(): string;
@@ -12,11 +12,11 @@ export declare class YomKippurKatanEvent extends HolidayEvent {
12
12
  constructor(date: HDate, nextMonthName: string);
13
13
  basename(): string;
14
14
  /**
15
- * @param [locale] Optional locale name (defaults to active locale).
15
+ * @param [locale] Optional locale name (defaults to empty locale)
16
16
  */
17
17
  render(locale?: string): string;
18
18
  /**
19
- * @param [locale] Optional locale name (defaults to active locale).
19
+ * @param [locale] Optional locale name (defaults to empty locale)
20
20
  */
21
21
  renderBrief(locale?: string): string;
22
22
  url(): string | undefined;
@@ -17,6 +17,7 @@ declare const _default: {
17
17
  "Ki Teitzei": string[];
18
18
  "Ki Tisa": string[];
19
19
  Matot: string[];
20
+ "Pesach Shabbat Chol ha-Moed": string[];
20
21
  "Purim Katan": string[];
21
22
  "Shabbat Chazon": string[];
22
23
  "Shabbat HaChodesh": string[];
@@ -41,6 +42,7 @@ declare const _default: {
41
42
  "Sukkot V (CH''M)": string[];
42
43
  "Sukkot VI (CH''M)": string[];
43
44
  "Sukkot VII (Hoshana Raba)": string[];
45
+ "Sukkot Shabbat Chol ha-Moed": string[];
44
46
  "Ta'anit Bechorot": string[];
45
47
  "Ta'anit Esther": string[];
46
48
  Toldot: string[];