File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,18 @@ export function greg2abs(date: Date): number {
112
112
* Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M.
113
113
* Clamen, Software--Practice and Experience, Volume 23, Number 4
114
114
* (April, 1993), pages 383-404 for an explanation.
115
+ *
116
+ * Note that this function returns the daytime portion of the date.
117
+ * For example, the 15th of Cheshvan 5769 began at sundown on
118
+ * 12 November 2008 and continues through 13 November 2008. This
119
+ * function would return only the date 13 November 2008.
115
120
* @param abs - R.D. number of days
121
+ * @example
122
+ * const hd = new HDate(15, 'Cheshvan', 5769);
123
+ * const date = hd.greg(); // 13 November 2008
124
+ * const year = date.getFullYear(); // 2008
125
+ * const monthNum = date.getMonth() + 1; // 11
126
+ * const day = date.getDate(); // 13
116
127
*/
117
128
export function abs2greg ( abs : number ) : Date {
118
129
if ( typeof abs !== 'number' ) {
Original file line number Diff line number Diff line change @@ -242,13 +242,20 @@ export class HDate {
242
242
243
243
/**
244
244
* Converts this Hebrew date to the corresponding Gregorian date.
245
+ *
246
+ * The returned `Date` object will be in the local (i.e. host system) time zone.
247
+ * Hours, minutes, seconds and milliseconds will all be zero.
248
+ *
245
249
* Note that this function returns the daytime portion of the date.
246
250
* For example, the 15th of Cheshvan 5769 began at sundown on
247
251
* 12 November 2008 and continues through 13 November 2008. This
248
252
* function would return only the date 13 November 2008.
249
253
* @example
250
254
* const hd = new HDate(15, 'Cheshvan', 5769);
251
- * hd.greg(); // 13 November 2008
255
+ * const date = hd.greg(); // 13 November 2008
256
+ * const year = date.getFullYear(); // 2008
257
+ * const monthNum = date.getMonth() + 1; // 11
258
+ * const day = date.getDate(); // 13
252
259
*/
253
260
greg ( ) : Date {
254
261
return abs2greg ( this . abs ( ) ) ;
You can’t perform that action at this time.
0 commit comments