UNPKG

jewish-date

Version:

Converts Gregorian dates to Hebrew dates and vice versa.

35 lines (34 loc) 1.69 kB
/** * Copyright (c) Shmulik Kravitz. * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory for more information. * */ import type { BasicJewishDate, BasicJewishDateHebrew, JewishMonthType } from "./interfaces"; /** * Returns the name of a Jewish month in Hebrew, given its type. * @param {JewishMonthType} jewishMonth - The Jewish month type. * @returns {string} - The name of the Jewish month in Hebrew. */ export declare const getJewishMonthInHebrew: (jewishMonth: JewishMonthType) => string; /** * Converts a number to its Hebrew equivalent in gematria * @param num - The number to convert to Hebrew * @param addGeresh - Whether or not to add a geresh symbol (') to the end of the number * @param addPunctuate - Whether or not to add a punctuation mark (.) after the thousands digit * @returns The Hebrew equivalent of the given number */ export declare const convertNumberToHebrew: (num: number, addGeresh?: boolean, addPunctuate?: boolean) => string; /** * Converts a basic Jewish date object to a Hebrew date object with Hebrew letters. * @param {BasicJewishDate} jewishDate - The basic Jewish date object to convert. * @returns {BasicJewishDateHebrew} The Hebrew date object with Hebrew letters. */ export declare const toHebrewJewishDate: (jewishDate: BasicJewishDate) => BasicJewishDateHebrew; /** * Formats a Jewish date object into a string representation in Hebrew. * @param {BasicJewishDate} jewishDate - The Jewish date object to format. * @returns {string} The Hebrew string representation of the Jewish date. */ export declare const formatJewishDateInHebrew: (jewishDate: BasicJewishDate) => string;