@hebcal/core 5.6.0 → 5.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.
Files changed (111) hide show
  1. package/README.md +23 -1
  2. package/dist/CalOptions.d.ts +1 -1
  3. package/dist/HolidayEvent.d.ts +0 -5
  4. package/dist/YomKippurKatanEvent.d.ts +0 -1
  5. package/dist/bundle.js +9735 -9576
  6. package/dist/bundle.js.map +1 -1
  7. package/dist/bundle.min.js +2 -2
  8. package/dist/bundle.min.js.map +1 -1
  9. package/dist/calendar.d.ts +110 -0
  10. package/dist/candles.d.ts +9 -1
  11. package/dist/es/CalOptions.d.ts +158 -0
  12. package/dist/es/DailyLearning.d.ts +21 -0
  13. package/dist/es/DailyLearning.js +36 -0
  14. package/dist/es/DailyLearning.js.map +1 -0
  15. package/dist/es/HebrewDateEvent.d.ts +37 -0
  16. package/dist/es/HebrewDateEvent.js +77 -0
  17. package/dist/es/HebrewDateEvent.js.map +1 -0
  18. package/dist/es/HolidayEvent.d.ts +76 -0
  19. package/dist/es/HolidayEvent.js +165 -0
  20. package/dist/es/HolidayEvent.js.map +1 -0
  21. package/dist/es/MevarchimChodeshEvent.d.ts +25 -0
  22. package/dist/es/MevarchimChodeshEvent.js +54 -0
  23. package/dist/es/MevarchimChodeshEvent.js.map +1 -0
  24. package/dist/es/ParshaEvent.d.ts +23 -0
  25. package/dist/es/ParshaEvent.js +53 -0
  26. package/dist/es/ParshaEvent.js.map +1 -0
  27. package/dist/es/TimedEvent.d.ts +47 -0
  28. package/dist/es/TimedEvent.js +97 -0
  29. package/dist/es/TimedEvent.js.map +1 -0
  30. package/dist/es/YomKippurKatanEvent.d.ts +23 -0
  31. package/dist/es/YomKippurKatanEvent.js +43 -0
  32. package/dist/es/YomKippurKatanEvent.js.map +1 -0
  33. package/dist/es/ashkenazi.po.d.ts +67 -0
  34. package/dist/es/ashkenazi.po.js +5 -0
  35. package/dist/es/ashkenazi.po.js.map +1 -0
  36. package/dist/es/calendar.d.ts +110 -0
  37. package/dist/es/calendar.js +615 -0
  38. package/dist/es/calendar.js.map +1 -0
  39. package/dist/es/candles.d.ts +36 -0
  40. package/dist/es/candles.js +154 -0
  41. package/dist/es/candles.js.map +1 -0
  42. package/dist/es/event.d.ts +187 -0
  43. package/dist/es/event.js +243 -0
  44. package/dist/es/event.js.map +1 -0
  45. package/dist/es/getStartAndEnd.d.ts +6 -0
  46. package/dist/es/getStartAndEnd.js +102 -0
  47. package/dist/es/getStartAndEnd.js.map +1 -0
  48. package/dist/es/hallel.d.ts +6 -0
  49. package/dist/es/hallel.js +52 -0
  50. package/dist/es/hallel.js.map +1 -0
  51. package/dist/es/he.po.d.ts +246 -0
  52. package/dist/es/he.po.js +5 -0
  53. package/dist/es/he.po.js.map +1 -0
  54. package/dist/es/hebcal.d.ts +259 -0
  55. package/dist/es/hebcal.js +336 -0
  56. package/dist/es/hebcal.js.map +1 -0
  57. package/dist/es/holidays.d.ts +22 -0
  58. package/dist/es/holidays.js +321 -0
  59. package/dist/es/holidays.js.map +1 -0
  60. package/dist/es/index.d.ts +23 -0
  61. package/dist/es/index.js +22 -0
  62. package/dist/es/index.js.map +1 -0
  63. package/dist/es/locale.d.ts +1 -0
  64. package/dist/es/locale.js +21 -0
  65. package/dist/es/locale.js.map +1 -0
  66. package/dist/es/location.d.ts +73 -0
  67. package/dist/es/location.js +306 -0
  68. package/dist/es/location.js.map +1 -0
  69. package/dist/es/modern.d.ts +18 -0
  70. package/dist/es/modern.js +64 -0
  71. package/dist/es/modern.js.map +1 -0
  72. package/dist/es/molad.d.ts +62 -0
  73. package/dist/es/molad.js +141 -0
  74. package/dist/es/molad.js.map +1 -0
  75. package/dist/es/omer.d.ts +37 -0
  76. package/dist/es/omer.js +88 -0
  77. package/dist/es/omer.js.map +1 -0
  78. package/dist/es/parshaName.d.ts +3 -0
  79. package/dist/es/parshaName.js +19 -0
  80. package/dist/es/parshaName.js.map +1 -0
  81. package/dist/es/pkgVersion.d.ts +2 -0
  82. package/dist/es/pkgVersion.js +6 -0
  83. package/dist/es/pkgVersion.js.map +1 -0
  84. package/dist/es/reformatTimeStr.d.ts +8 -0
  85. package/dist/es/reformatTimeStr.js +52 -0
  86. package/dist/es/reformatTimeStr.js.map +1 -0
  87. package/dist/es/sedra.d.ts +107 -0
  88. package/dist/es/sedra.js +494 -0
  89. package/dist/es/sedra.js.map +1 -0
  90. package/dist/es/staticHolidays.d.ts +176 -0
  91. package/dist/es/staticHolidays.js +626 -0
  92. package/dist/es/staticHolidays.js.map +1 -0
  93. package/dist/es/tachanun.d.ts +29 -0
  94. package/dist/es/tachanun.js +125 -0
  95. package/dist/es/tachanun.js.map +1 -0
  96. package/dist/es/zmanim.d.ts +341 -0
  97. package/dist/es/zmanim.js +573 -0
  98. package/dist/es/zmanim.js.map +1 -0
  99. package/dist/event.d.ts +1 -0
  100. package/dist/he.po.d.ts +0 -51
  101. package/dist/holidays.d.ts +13 -0
  102. package/dist/index.cjs +2757 -10038
  103. package/dist/index.cjs.map +1 -1
  104. package/dist/index.d.ts +3 -2
  105. package/dist/module.d.ts +105 -80
  106. package/dist/pkgVersion.d.ts +1 -1
  107. package/dist/sedra.d.ts +9 -4
  108. package/dist/tachanun.d.ts +17 -1
  109. package/package.json +21 -9
  110. package/dist/index.mjs +0 -11993
  111. package/dist/index.mjs.map +0 -1
package/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # @hebcal/core
2
+
2
3
  Hebcal is a perpetual Jewish Calendar. This library converts between
3
4
  Hebrew and Gregorian dates, and generates lists of Jewish holidays for
4
5
  any year (past, present or future). Shabbat and holiday candle
@@ -20,11 +21,31 @@ Many users of this library will utilize the [HebrewCalendar](https://hebcal.gith
20
21
  and [HDate](https://hebcal.github.io/api/hdate/classes/HDate.html) interfaces.
21
22
 
22
23
  ## Installation
24
+
23
25
  ```bash
24
- $ npm install @hebcal/core
26
+ npm install @hebcal/core
25
27
  ```
26
28
 
29
+ ## Usage
30
+
31
+ This package exports 3 categories of output:
32
+
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
+ - `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.
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
+ - 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
+
39
+ ```ts
40
+ import {getHolidaysOnDate} from '@hebcal/core/dist/es/holidays';
41
+ ```
42
+
43
+ - This can save hundreds of kilobytes by dropping Zmanim dependencies if your code doesn't use them.
44
+
45
+ - You will need to include `@rollup/plugin-node-resolve` in your Rollup config.
46
+
27
47
  ## Synopsis
48
+
28
49
  ```javascript
29
50
  import {HebrewCalendar, HDate, Location, Event} from '@hebcal/core';
30
51
 
@@ -44,4 +65,5 @@ for (const ev of events) {
44
65
  console.log(date.toLocaleDateString(), ev.render('en'), hd.toString());
45
66
  }
46
67
  ```
68
+
47
69
  ## [API Documentation](https://hebcal.github.io/api/core/index.html)
@@ -1,5 +1,5 @@
1
1
  import { HDate } from '@hebcal/hdate';
2
- import { Location } from './location';
2
+ import type { Location } from './location';
3
3
  export type DailyLearningValue = boolean | number | string;
4
4
  /**
5
5
  * Options to configure which events are returned
@@ -1,6 +1,5 @@
1
1
  import { HDate } from '@hebcal/hdate';
2
2
  import { Event } from './event';
3
- import { TimedEvent } from './TimedEvent';
4
3
  import './locale';
5
4
  /** Represents a built-in holiday like Pesach, Purim or Tu BiShvat */
6
5
  export declare class HolidayEvent extends Event {
@@ -13,10 +12,6 @@ export declare class HolidayEvent extends Event {
13
12
  * - Tzom Tammuz postponed from the 17th to the 18th
14
13
  */
15
14
  observed?: boolean;
16
- /** For a Fast day, this will be a "Fast begins" event */
17
- startEvent?: TimedEvent;
18
- /** For a Fast day, this will be a "Fast ends" event */
19
- endEvent?: TimedEvent;
20
15
  basename(): string;
21
16
  url(): string | undefined;
22
17
  urlDateSuffix(): string;
@@ -1,7 +1,6 @@
1
1
  import { HDate } from '@hebcal/hdate';
2
2
  import { HolidayEvent } from './HolidayEvent';
3
3
  import './locale';
4
- export declare const ykk = "Yom Kippur Katan";
5
4
  /** YKK is minor day of atonement on the day preceeding each Rosh Chodesh */
6
5
  export declare class YomKippurKatanEvent extends HolidayEvent {
7
6
  private readonly nextMonthName;