import { HDate } from '@hebcal/hdate'; import { Event } from './event'; import './locale'; /** * Represents a built-in holiday like Pesach, Purim or Tu BiShvat. * * Most holiday-related events emitted by {@link HebrewCalendar.calendar} * are instances of `HolidayEvent` or one of its subclasses * ({@link ChanukahEvent}, {@link AsaraBTevetEvent}, * {@link RoshHashanaEvent}, {@link RoshChodeshEvent}). * * Adds two notable behaviors over the base {@link Event}: * * - {@link HolidayEvent.basename} strips qualifiers like `Erev `, ` I`/`II`, * `(CH''M)`, `(observed)`, candle counts, etc. (e.g. `"Erev Pesach"` → * `"Pesach"`). * - {@link HolidayEvent.url} returns a `https://www.hebcal.com/holidays/...` * link for the holiday. */ export declare class HolidayEvent extends Event { /** During Sukkot or Pesach */ cholHaMoedDay?: number; /** * `true` if the fast day was postponed a day to avoid Shabbat. * - Tish'a B'Av postponed from the 9th to the 10th * - Tzom Tammuz postponed from the 17th to the 18th */ observed?: boolean; constructor(date: HDate, desc: string, mask?: number, attrs?: object); /** * Returns a simplified (untranslated) name for this holiday, stripping * qualifiers so that related events group under one name. * * Strips trailing 4-digit years, `(CH''M)`, `(observed)`, `(Hoshana Raba)`, * Roman-numeral day numbers (` I`, ` II`, ...), Chanukah candle counts, * `: 8th Day`, and a leading `"Erev "`. * @example * // 'Erev Pesach' => 'Pesach' * // 'Sukkot III (CH''M)' => 'Sukkot' * // 'Chanukah: 5 Candles' => 'Chanukah' * // 'Rosh Hashana 5784' => 'Rosh Hashana' */ basename(): string; /** * Returns a `https://www.hebcal.com/holidays/...` URL for more detail on * this holiday. Israel-only holidays get an `?i=on` query parameter. * Returns `undefined` for years outside `[100, 2999]`. */ url(): string | undefined; urlDateSuffix(): string; getEmoji(): string; getCategories(): string[]; /** * Returns (translated) description of this event * @param [locale] Optional locale name (defaults to empty locale) */ render(locale?: string): string; /** * Returns a brief (translated) description of this event. * For most events, this is the same as render(). For some events, it procudes * a shorter text (e.g. without a time or added description). * @param [locale] Optional locale name (defaults to empty locale) */ renderBrief(locale?: string): string; } /** * Because Asara B'Tevet often occurs twice in the same Gregorian year, * we subclass HolidayEvent to generate the correct URL. */ export declare class AsaraBTevetEvent extends HolidayEvent { urlDateSuffix(): string; } /** * Because Chanukah sometimes starts in December and ends in January, * we subclass HolidayEvent to generate the correct URL. */ export declare class ChanukahEvent extends HolidayEvent { readonly chanukahDay?: number; /** * @param chanukahDay should be undefined for 1st night of Chanukah */ constructor(date: HDate, desc: string, mask: number, chanukahDay?: number); urlDateSuffix(): string; } /** Represents Rosh Hashana, the Jewish New Year */ export declare class RoshHashanaEvent extends HolidayEvent { private readonly hyear; /** * @private * @param date Hebrew date event occurs * @param hyear Hebrew year * @param mask optional holiday flags */ constructor(date: HDate, hyear: number, mask: number); /** * Returns (translated) description of this event * @param [locale] Optional locale name (defaults to empty locale) */ render(locale?: string): string; getEmoji(): string; } /** Represents Rosh Chodesh, the beginning of a new month */ export declare class RoshChodeshEvent extends HolidayEvent { /** * Constructs Rosh Chodesh event * @param date Hebrew date event occurs * @param monthName Hebrew month name (not translated) */ constructor(date: HDate, monthName: string); /** * Returns (translated) description of this event * @param [locale] Optional locale name (defaults to empty locale) */ render(locale?: string): string; basename(): string; getEmoji(): string; }