@hebcal/core
Version:
A perpetual Jewish Calendar API
54 lines (53 loc) • 2.11 kB
TypeScript
import { HDate } from '@hebcal/hdate';
import { Event } from './event';
import './locale';
/**
* Language for counting the Omer can be English or Hebrew.
* Lang for the Sefira can be English, Hebrew, or Hebrew in Sephardic transliteration.
*/
export type OmerLang = 'en' | 'he' | 'translit';
/** Represents a day 1-49 of counting the Omer from Pesach to Shavuot */
export declare class OmerEvent extends Event {
private readonly weekNumber;
private readonly daysWithinWeeks;
readonly omer: number;
emoji?: string;
/**
* @param date
* @param omerDay
*/
constructor(date: HDate, omerDay: number);
/**
* Returns the sefira. For example, on day 8:
* * חֶֽסֶד שֶׁבִּגְבוּרָה
* * Chesed shebiGevurah
* * Lovingkindness within Might
* @param lang `en` (English), `he` (Hebrew with nikud), or `translit` (Hebrew in Sephardic transliteration)
* @returns a string such as `Lovingkindness within Might` or `חֶֽסֶד שֶׁבִּגְבוּרָה`
*/
sefira(lang?: OmerLang): string;
/**
* @param [locale] Optional locale name (defaults to active locale).
*/
render(locale?: string): string;
/**
* Returns translation of "Omer day 22" without ordinal numbers.
* @param [locale] Optional locale name (defaults to active locale).
*/
renderBrief(locale?: string): string;
/**
* Returns an emoji number symbol with a circle, for example `㊲`
* from the “Enclosed CJK Letters and Months” block of the Unicode standard
* @returns a single Unicode character from `①` through `㊾`
*/
getEmoji(): string;
getWeeks(): number;
getDaysWithinWeeks(): number;
/**
* Returns a sentence with that evening's omer count
* @returns a string such as `Today is 10 days, which is 1 week and 3 days of the Omer`
* or `הַיוֹם עֲשָׂרָה יָמִים, שְׁהֵם שָׁבוּעַ אֶחָד וְשְׁלוֹשָׁה יָמִים לָעוֹמֶר`
*/
getTodayIs(locale: string): string;
url(): string;
}