@hebcal/core 6.0.5 → 6.0.7

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 (149) hide show
  1. package/README.md +42 -27
  2. package/dist/bundle.js +26 -15
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/bundle.min.js +3 -3
  5. package/dist/bundle.min.js.map +1 -1
  6. package/dist/esm/DailyLearning.js +1 -1
  7. package/dist/esm/HebrewDateEvent.js +1 -1
  8. package/dist/esm/HolidayEvent.js +2 -2
  9. package/dist/esm/HolidayEvent.js.map +1 -1
  10. package/dist/esm/MevarchimChodeshEvent.js +1 -1
  11. package/dist/esm/ParshaEvent.js +2 -2
  12. package/dist/esm/ParshaEvent.js.map +1 -1
  13. package/dist/esm/TimedEvent.js +1 -1
  14. package/dist/esm/YomKippurKatanEvent.js +1 -1
  15. package/dist/esm/ashkenazi.po.js +1 -1
  16. package/dist/esm/calendar.js +7 -5
  17. package/dist/esm/calendar.js.map +1 -1
  18. package/dist/esm/candles.js +1 -1
  19. package/dist/esm/event.js +1 -1
  20. package/dist/esm/getStartAndEnd.js +1 -1
  21. package/dist/esm/hallel.js +1 -1
  22. package/dist/esm/he-x-NoNikud.po.d.ts +2 -0
  23. package/dist/esm/he-x-NoNikud.po.js +2 -2
  24. package/dist/esm/he-x-NoNikud.po.js.map +1 -1
  25. package/dist/esm/he.po.d.ts +1 -0
  26. package/dist/esm/he.po.js +2 -2
  27. package/dist/esm/he.po.js.map +1 -1
  28. package/dist/esm/hebcal.js +1 -1
  29. package/dist/esm/holidays.js +1 -1
  30. package/dist/esm/holidays.js.map +1 -1
  31. package/dist/esm/index.js +1 -1
  32. package/dist/esm/isAssurBemlacha.js +1 -1
  33. package/dist/esm/locale.js +1 -1
  34. package/dist/esm/location.js +2 -2
  35. package/dist/esm/location.js.map +1 -1
  36. package/dist/esm/modern.js +1 -1
  37. package/dist/esm/molad.js +1 -1
  38. package/dist/esm/omer.d.ts +1 -1
  39. package/dist/esm/omer.js +6 -2
  40. package/dist/esm/omer.js.map +1 -1
  41. package/dist/esm/parshaName.js +1 -1
  42. package/dist/esm/parshaYear.d.ts +2 -2
  43. package/dist/esm/parshaYear.js +1 -1
  44. package/dist/esm/parshaYear.js.map +1 -1
  45. package/dist/esm/pkgVersion.d.ts +1 -1
  46. package/dist/esm/pkgVersion.js +2 -2
  47. package/dist/esm/pkgVersion.js.map +1 -1
  48. package/dist/esm/reformatTimeStr.js +1 -1
  49. package/dist/esm/sedra.d.ts +5 -1
  50. package/dist/esm/sedra.js +9 -3
  51. package/dist/esm/sedra.js.map +1 -1
  52. package/dist/esm/staticHolidays.js +1 -2
  53. package/dist/esm/staticHolidays.js.map +1 -1
  54. package/dist/esm/tachanun.js +1 -1
  55. package/dist/esm/zmanim.js +1 -1
  56. package/dist/he-x-NoNikud.po.d.ts +2 -0
  57. package/dist/he.po.d.ts +1 -0
  58. package/dist/omer.d.ts +1 -1
  59. package/dist/parshaYear.d.ts +2 -2
  60. package/dist/pkgVersion.d.ts +1 -1
  61. package/dist/po2json.d.ts +1 -0
  62. package/dist/po2json.js +41 -0
  63. package/dist/sedra.d.ts +5 -1
  64. package/dist/size-demo/dist/getHoliday.d.ts +1944 -0
  65. package/dist/size-demo/dist/getHoliday.js +3712 -0
  66. package/dist/size-demo/dist/parshiyot.js +10662 -0
  67. package/dist/size-demo/dist/sedra.d.ts +1411 -0
  68. package/dist/size-demo/dist/sedra.js +2359 -0
  69. package/dist/size-demo/dist/tachanun.d.ts +1015 -0
  70. package/dist/size-demo/dist/tachanun.js +1755 -0
  71. package/dist/size-demo/getHoliday.d.ts +1 -0
  72. package/dist/size-demo/getHoliday.js +3 -0
  73. package/dist/size-demo/parshiyot.d.ts +1 -0
  74. package/dist/size-demo/parshiyot.js +11 -0
  75. package/dist/size-demo/rollup.config.d.ts +3 -0
  76. package/dist/size-demo/rollup.config.js +47 -0
  77. package/dist/size-demo/sedra.d.ts +1 -0
  78. package/dist/size-demo/sedra.js +3 -0
  79. package/dist/size-demo/tachanun.d.ts +1 -0
  80. package/dist/size-demo/tachanun.js +3 -0
  81. package/dist/src/CalOptions.d.ts +168 -0
  82. package/dist/src/CalOptions.js +1 -0
  83. package/dist/src/DailyLearning.d.ts +32 -0
  84. package/dist/src/DailyLearning.js +55 -0
  85. package/dist/src/HebrewDateEvent.d.ts +37 -0
  86. package/dist/src/HebrewDateEvent.js +72 -0
  87. package/dist/src/HolidayEvent.d.ts +83 -0
  88. package/dist/src/HolidayEvent.js +186 -0
  89. package/dist/src/MevarchimChodeshEvent.d.ts +26 -0
  90. package/dist/src/MevarchimChodeshEvent.js +50 -0
  91. package/dist/src/ParshaEvent.d.ts +19 -0
  92. package/dist/src/ParshaEvent.js +43 -0
  93. package/dist/src/TimedEvent.d.ts +47 -0
  94. package/dist/src/TimedEvent.js +92 -0
  95. package/dist/src/YomKippurKatanEvent.d.ts +23 -0
  96. package/dist/src/YomKippurKatanEvent.js +38 -0
  97. package/dist/src/ashkenazi.po.d.ts +70 -0
  98. package/dist/src/ashkenazi.po.js +1 -0
  99. package/dist/src/calendar.d.ts +111 -0
  100. package/dist/src/calendar.js +660 -0
  101. package/dist/src/candles.d.ts +44 -0
  102. package/dist/src/candles.js +163 -0
  103. package/dist/src/event.d.ts +188 -0
  104. package/dist/src/event.js +233 -0
  105. package/dist/src/getStartAndEnd.d.ts +6 -0
  106. package/dist/src/getStartAndEnd.js +97 -0
  107. package/dist/src/hallel.d.ts +6 -0
  108. package/dist/src/hallel.js +47 -0
  109. package/dist/src/he-x-NoNikud.po.d.ts +15 -0
  110. package/dist/src/he-x-NoNikud.po.js +1 -0
  111. package/dist/src/he.po.d.ts +195 -0
  112. package/dist/src/he.po.js +1 -0
  113. package/dist/src/hebcal.d.ts +260 -0
  114. package/dist/src/hebcal.js +332 -0
  115. package/dist/src/holidays.d.ts +22 -0
  116. package/dist/src/holidays.js +288 -0
  117. package/dist/src/index.d.ts +26 -0
  118. package/dist/src/index.js +24 -0
  119. package/dist/src/isAssurBemlacha.d.ts +9 -0
  120. package/dist/src/isAssurBemlacha.js +62 -0
  121. package/dist/src/locale.d.ts +2 -0
  122. package/dist/src/locale.js +11 -0
  123. package/dist/src/location.d.ts +73 -0
  124. package/dist/src/location.js +306 -0
  125. package/dist/src/modern.d.ts +18 -0
  126. package/dist/src/modern.js +59 -0
  127. package/dist/src/molad.d.ts +62 -0
  128. package/dist/src/molad.js +169 -0
  129. package/dist/src/omer.d.ts +53 -0
  130. package/dist/src/omer.js +302 -0
  131. package/dist/src/parshaName.d.ts +2 -0
  132. package/dist/src/parshaName.js +13 -0
  133. package/dist/src/parshaYear.d.ts +9 -0
  134. package/dist/src/parshaYear.js +24 -0
  135. package/dist/src/pkgVersion.d.ts +2 -0
  136. package/dist/src/pkgVersion.js +2 -0
  137. package/dist/src/reformatTimeStr.d.ts +8 -0
  138. package/dist/src/reformatTimeStr.js +48 -0
  139. package/dist/src/sedra.d.ts +95 -0
  140. package/dist/src/sedra.js +477 -0
  141. package/dist/src/staticHolidays.d.ts +176 -0
  142. package/dist/src/staticHolidays.js +614 -0
  143. package/dist/src/tachanun.d.ts +29 -0
  144. package/dist/src/tachanun.js +120 -0
  145. package/dist/src/zmanim.d.ts +347 -0
  146. package/dist/src/zmanim.js +579 -0
  147. package/dist/version.d.ts +1 -0
  148. package/dist/version.js +9 -0
  149. package/package.json +12 -9
@@ -0,0 +1,111 @@
1
+ import { CalOptions } from './CalOptions';
2
+ import { Event } from './event';
3
+ /**
4
+ * Calculates holidays and other Hebrew calendar events based on {@link CalOptions}.
5
+ *
6
+ * Each holiday is represented by an {@link Event} object which includes a date,
7
+ * a description, flags and optional attributes.
8
+ * If given no options, returns holidays for the Diaspora for the current Gregorian year.
9
+ *
10
+ * The date range returned by this function can be controlled by:
11
+ * * `options.year` - Gregorian (e.g. 1993) or Hebrew year (e.g. 5749)
12
+ * * `options.isHebrewYear` - to interpret `year` as Hebrew year
13
+ * * `options.numYears` - generate calendar for multiple years (default 1)
14
+ * * `options.month` - Gregorian or Hebrew month (to filter results to a single month)
15
+ *
16
+ * Alternatively, specify start and end days with `Date` or {@link HDate} instances:
17
+ * * `options.start` - use specific start date (requires `end` date)
18
+ * * `options.end` - use specific end date (requires `start` date)
19
+ *
20
+ * Unless `options.noHolidays == true`, default holidays include:
21
+ * * Major holidays - Rosh Hashana, Yom Kippur, Pesach, Sukkot, etc.
22
+ * * Minor holidays - Purim, Chanukah, Tu BiShvat, Lag BaOmer, etc.
23
+ * * Minor fasts - Ta'anit Esther, Tzom Gedaliah, etc. (unless `options.noMinorFast`)
24
+ * * Special Shabbatot - Shabbat Shekalim, Zachor, etc. (unless `options.noSpecialShabbat`)
25
+ * * Modern Holidays - Yom HaShoah, Yom HaAtzma'ut, etc. (unless `options.noModern`)
26
+ * * Rosh Chodesh (unless `options.noRoshChodesh`)
27
+ *
28
+ * Holiday and Torah reading schedules differ between Israel and the Disapora.
29
+ * Set `options.il=true` to use the Israeli schedule.
30
+ *
31
+ * Additional non-default event types can be specified:
32
+ * * Parashat HaShavua - weekly Torah Reading on Saturdays (`options.sedrot`)
33
+ * * Counting of the Omer (`options.omer`)
34
+ * * Shabbat Mevarchim HaChodesh on Saturday before Rosh Chodesh (`options.shabbatMevarchim`)
35
+ * * Molad announcement on Saturday before Rosh Chodesh (`options.molad`)
36
+ * * Yom Kippur Katan (`options.yomKippurKatan`)
37
+ * * Yizkor (`options.yizkor`)
38
+ *
39
+ * Daily Study of texts are supported by the
40
+ * {@link https://github.com/hebcal/hebcal-learning @hebcal/learning} package,
41
+ * for example:
42
+ * * Babylonian Talmud Daf Yomi (`options.dailyLearning.dafYomi`)
43
+ * * Jerusalem Talmud (Yerushalmi) Yomi (`options.dailyLearning.yerushalmi`)
44
+ * * Mishna Yomi (`options.dailyLearning.mishnaYomi`)
45
+ * * Nach Yomi (`options.dailyLearning.nachYomi`)
46
+ *
47
+ * Candle-lighting and Havdalah times are approximated using latitude and longitude
48
+ * specified by the {@link Location} class. The `Location` class contains a small
49
+ * database of cities with their associated geographic information and time-zone information.
50
+ * If you ever have any doubts about Hebcal's times, consult your local halachic authority.
51
+ * If you enter geographic coordinates above the arctic circle or antarctic circle,
52
+ * the times are guaranteed to be wrong.
53
+ *
54
+ * To add candle-lighting options, set `options.candlelighting=true` and set
55
+ * `options.location` to an instance of `Location`. By default, candle lighting
56
+ * time is 18 minutes before sundown (40 minutes for Jerusalem,
57
+ * 30 minutes for Haifa and Zikhron Ya'akov) and Havdalah is
58
+ * calculated according to Tzeit Hakochavim - Nightfall (the point when 3 small stars
59
+ * are observable in the night time sky with the naked eye). The default Havdalah
60
+ * option (Tzeit Hakochavim) is calculated when the sun is 8.5° below the horizon.
61
+ * These defaults can be changed using these options:
62
+ * * `options.candleLightingMins` - minutes before sundown to light candles
63
+ * * `options.havdalahMins` - minutes after sundown for Havdalah (typical values are 42, 50, or 72).
64
+ * Havdalah times are suppressed when `options.havdalahMins=0`.
65
+ * * `options.havdalahDeg` - degrees for solar depression for Havdalah.
66
+ * Default is 8.5 degrees for 3 small stars. Use 7.083 degrees for 3 medium-sized stars.
67
+ * Havdalah times are suppressed when `options.havdalahDeg=0`.
68
+ *
69
+ * If both `options.candlelighting=true` and `options.location` is specified,
70
+ * Chanukah candle-lighting times and minor fast start/end times will also be generated.
71
+ * Chanukah candle-lighting is at Bein HaShmashos (13.5 minutes before
72
+ * the sun is 7.083° below the horizon in the evening)
73
+ * on weekdays, at regular candle-lighting time on Fridays, and at regular Havdalah time on
74
+ * Saturday night (see above).
75
+ *
76
+ * Minor fasts begin at Alot HaShachar (sun is 16.1° below the horizon in the morning) and
77
+ * end when 3 medium-sized stars are observable in the night sky (sun is 7.083° below the horizon
78
+ * in the evening).
79
+ *
80
+ * Two options also exist for generating an Event with the Hebrew date:
81
+ * * `options.addHebrewDates` - print the Hebrew date for the entire date range
82
+ * * `options.addHebrewDatesForEvents` - print the Hebrew date for dates with some events
83
+ *
84
+ * Lastly, translation and transliteration of event titles is controlled by
85
+ * `options.locale` and the {@link Locale} API.
86
+ * `@hebcal/core` supports three locales by default:
87
+ * * `en` - default, Sephardic transliterations (e.g. "Shabbat")
88
+ * * `ashkenazi` - Ashkenazi transliterations (e.g. "Shabbos")
89
+ * * `he` - Hebrew (e.g. "שַׁבָּת")
90
+ *
91
+ * Additional locales (such as `ru` or `fr`) are supported by the
92
+ * {@link https://github.com/hebcal/hebcal-locales @hebcal/locales} package
93
+ *
94
+ * @example
95
+ * import {HebrewCalendar, HDate, Location, Event} from '@hebcal/core';
96
+ * const options: CalOptions = {
97
+ * year: 1981,
98
+ * isHebrewYear: false,
99
+ * candlelighting: true,
100
+ * location: Location.lookup('San Francisco'),
101
+ * sedrot: true,
102
+ * omer: true,
103
+ * };
104
+ * const events = HebrewCalendar.calendar(options);
105
+ * for (const ev of events) {
106
+ * const hd = ev.getDate();
107
+ * const date = hd.greg();
108
+ * console.log(date.toLocaleDateString(), ev.render('en'), hd.toString());
109
+ * }
110
+ */
111
+ export declare function calendar(options?: CalOptions): Event[];