@hebcal/hdate
Version:
converts between Hebrew and Gregorian dates using Rata Die (R.D.) algorithm by Dershowitz and Reingold
22 lines (21 loc) • 765 B
TypeScript
/**
* Converts a numerical value to a string of Hebrew letters.
*
* When specifying years of the Hebrew calendar in the present millennium,
* we omit the thousands (which is presently 5 [ה]).
* @example
* gematriya(5774) // 'תשע״ד' - cropped to 774
* gematriya(25) // 'כ״ה'
* gematriya(60) // 'ס׳'
* gematriya(3761) // 'ג׳תשס״א'
* gematriya(1123) // 'א׳קכ״ג'
*/
export declare function gematriya(num: number | string): string;
/**
* Converts a string of Hebrew letters to a numerical value.
*
* Only considers the value of Hebrew letters `א` through `ת`.
* Ignores final Hebrew letters such as `ך` (kaf sofit) or `ם` (mem sofit)
* and vowels (nekudot).
*/
export declare function gematriyaStrToNum(str: string): number;