@hebcal/core 5.7.4 → 5.7.6

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/dist/bundle.js CHANGED
@@ -1,9 +1,9 @@
1
- /*! @hebcal/core v5.7.4 */
1
+ /*! @hebcal/core v5.7.6 */
2
2
  var hebcal = (function (exports) {
3
3
  'use strict';
4
4
 
5
5
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
6
- const version = '5.7.4';
6
+ const version = '5.7.6';
7
7
 
8
8
  /* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
9
9
  /** @private */
@@ -101,7 +101,18 @@ function greg2abs(date) {
101
101
  * Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M.
102
102
  * Clamen, Software--Practice and Experience, Volume 23, Number 4
103
103
  * (April, 1993), pages 383-404 for an explanation.
104
+ *
105
+ * Note that this function returns the daytime portion of the date.
106
+ * For example, the 15th of Cheshvan 5769 began at sundown on
107
+ * 12 November 2008 and continues through 13 November 2008. This
108
+ * function would return only the date 13 November 2008.
104
109
  * @param abs - R.D. number of days
110
+ * @example
111
+ * const abs = hebrew2abs(5769, months.CHESHVAN, 15);
112
+ * const date = abs2greg(abs); // 13 November 2008
113
+ * const year = date.getFullYear(); // 2008
114
+ * const monthNum = date.getMonth() + 1; // 11
115
+ * const day = date.getDate(); // 13
105
116
  */
106
117
  function abs2greg(abs) {
107
118
  if (typeof abs !== 'number') {
@@ -212,6 +223,8 @@ function assertNumber(n, name) {
212
223
  * @param year Hebrew year
213
224
  * @param month Hebrew month
214
225
  * @param day Hebrew date (1-30)
226
+ * @example
227
+ * const abs = hebrew2abs(5769, months.CHESHVAN, 15);
215
228
  */
216
229
  function hebrew2abs(year, month, day) {
217
230
  assertNumber(year, 'year');
@@ -1430,13 +1443,20 @@ class HDate {
1430
1443
  }
1431
1444
  /**
1432
1445
  * Converts this Hebrew date to the corresponding Gregorian date.
1446
+ *
1447
+ * The returned `Date` object will be in the local (i.e. host system) time zone.
1448
+ * Hours, minutes, seconds and milliseconds will all be zero.
1449
+ *
1433
1450
  * Note that this function returns the daytime portion of the date.
1434
1451
  * For example, the 15th of Cheshvan 5769 began at sundown on
1435
1452
  * 12 November 2008 and continues through 13 November 2008. This
1436
1453
  * function would return only the date 13 November 2008.
1437
1454
  * @example
1438
1455
  * const hd = new HDate(15, 'Cheshvan', 5769);
1439
- * hd.greg(); // 13 November 2008
1456
+ * const date = hd.greg(); // 13 November 2008
1457
+ * const year = date.getFullYear(); // 2008
1458
+ * const monthNum = date.getMonth() + 1; // 11
1459
+ * const day = date.getDate(); // 13
1440
1460
  */
1441
1461
  greg() {
1442
1462
  return abs2greg(this.abs());