@hebcal/hdate
Advanced tools
Comparing version 0.9.3 to 0.9.4
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.monthFromName = exports.shortKislev = exports.longCheshvan = exports.daysInYear = exports.elapsedDays = exports.getMonthName = exports.daysInMonth = exports.monthsInYear = exports.isLeapYear = exports.abs2hebrew = exports.hebrew2abs = exports.months = void 0; | ||
exports.monthFromName = exports.shortKislev = exports.longCheshvan = exports.daysInYear = exports.elapsedDays = exports.getMonthName = exports.daysInMonth = exports.monthsInYear = exports.isLeapYear = exports.abs2hebrew = exports.hd2abs = exports.hebrew2abs = exports.months = void 0; | ||
const NISAN = 1; | ||
@@ -123,2 +123,11 @@ const IYYAR = 2; | ||
/** | ||
* Converts Hebrew date to R.D. (Rata Die) fixed days. | ||
* R.D. 1 is the imaginary date Monday, January 1, 1 on the Gregorian | ||
* Calendar. | ||
*/ | ||
function hd2abs(hdate) { | ||
return hebrew2abs(hdate.yy, hdate.mm, hdate.dd); | ||
} | ||
exports.hd2abs = hd2abs; | ||
/** | ||
* @private | ||
@@ -125,0 +134,0 @@ */ |
@@ -24,1 +24,3 @@ "use strict"; | ||
__exportStar(require("./omer"), exports); | ||
__exportStar(require("./molad"), exports); | ||
__exportStar(require("./tachanun"), exports); |
@@ -118,2 +118,10 @@ /* | ||
/** | ||
* Converts Hebrew date to R.D. (Rata Die) fixed days. | ||
* R.D. 1 is the imaginary date Monday, January 1, 1 on the Gregorian | ||
* Calendar. | ||
*/ | ||
export function hd2abs(hdate) { | ||
return hebrew2abs(hdate.yy, hdate.mm, hdate.dd); | ||
} | ||
/** | ||
* @private | ||
@@ -120,0 +128,0 @@ */ |
@@ -6,1 +6,3 @@ export { greg } from './greg'; | ||
export * from './omer'; | ||
export * from './molad'; | ||
export * from './tachanun'; |
@@ -44,2 +44,8 @@ /** | ||
export declare function hebrew2abs(year: number, month: number, day: number): number; | ||
/** | ||
* Converts Hebrew date to R.D. (Rata Die) fixed days. | ||
* R.D. 1 is the imaginary date Monday, January 1, 1 on the Gregorian | ||
* Calendar. | ||
*/ | ||
export declare function hd2abs(hdate: SimpleHebrewDate): number; | ||
export type SimpleHebrewDate = { | ||
@@ -46,0 +52,0 @@ /** Hebrew year */ |
@@ -6,1 +6,3 @@ export { greg } from './greg'; | ||
export * from './omer'; | ||
export * from './molad'; | ||
export * from './tachanun'; |
{ | ||
"name": "@hebcal/hdate", | ||
"version": "0.9.3", | ||
"version": "0.9.4", | ||
"description": "converts between Hebrew and Gregorian dates using Rata Die (R.D.) algorithm by Dershowitz and Reingold", | ||
@@ -42,3 +42,3 @@ "author": "Michael J. Radwin (https://github.com/mjradwin)", | ||
"@ava/typescript": "^5.0.0", | ||
"@types/node": "20.12.10", | ||
"@types/node": "20.12.12", | ||
"ava": "^6.1.3", | ||
@@ -45,0 +45,0 @@ "gts": "^5.3.0", |
@@ -121,2 +121,15 @@ # @hebcal/hdate | ||
</dd> | ||
<dt><a href="#omerSefira">omerSefira(omerDay, lang)</a> ⇒</dt> | ||
<dd><p>Returns the sefira. For example, on day 8 | ||
חֶֽסֶד שֶׁבִּגְבוּרָה | ||
Chesed shebiGevurah | ||
Lovingkindness within Might</p> | ||
</dd> | ||
<dt><a href="#omerTodayIs">omerTodayIs(omerDay, lang)</a> ⇒</dt> | ||
<dd><p>Returns a sentence with that evening's omer count</p> | ||
</dd> | ||
<dt><a href="#omerEmoji">omerEmoji(omerDay)</a> ⇒</dt> | ||
<dd><p>Returns an emoji number symbol with a circle, for example <code>㊲</code> | ||
from the “Enclosed CJK Letters and Months” block of the Unicode standard</p> | ||
</dd> | ||
</dl> | ||
@@ -399,1 +412,43 @@ | ||
<a name="omerSefira"></a> | ||
## omerSefira(omerDay, lang) ⇒ | ||
Returns the sefira. For example, on day 8 | ||
חֶֽסֶד שֶׁבִּגְבוּרָה | ||
Chesed shebiGevurah | ||
Lovingkindness within Might | ||
**Kind**: global function | ||
**Returns**: a string such as `Lovingkindness within Might` or `חֶֽסֶד שֶׁבִּגְבוּרָה` | ||
| Param | Description | | ||
| --- | --- | | ||
| omerDay | the day of the omer, 1-49 inclusive | | ||
| lang | `en` (English), `he` (Hebrew with nikud), or `translit` (Hebrew in Sephardic transliteration) | | ||
<a name="omerTodayIs"></a> | ||
## omerTodayIs(omerDay, lang) ⇒ | ||
Returns a sentence with that evening's omer count | ||
**Kind**: global function | ||
**Returns**: a string such as `Today is 10 days, which is 1 week and 3 days of the Omer` | ||
or `הַיוֹם עֲשָׂרָה יָמִים, שְׁהֵם שָׁבוּעַ אֶחָד וְשְׁלוֹשָׁה יָמִים לָעוֹמֶר` | ||
| Param | Description | | ||
| --- | --- | | ||
| omerDay | the day of the omer, 1-49 inclusive | | ||
| lang | `en` (English), `he` (Hebrew with nikud) | | ||
<a name="omerEmoji"></a> | ||
## omerEmoji(omerDay) ⇒ | ||
Returns an emoji number symbol with a circle, for example `㊲` | ||
from the “Enclosed CJK Letters and Months” block of the Unicode standard | ||
**Kind**: global function | ||
**Returns**: a single Unicode character from `①` through `㊾` | ||
| Param | Description | | ||
| --- | --- | | ||
| omerDay | the day of the omer, 1-49 inclusive | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130324
30
2965
453