UNPKG

@hebcal/core

Version:

A perpetual Jewish Calendar API

33 lines (32 loc) 1.25 kB
import { HDate } from '@hebcal/hdate'; import { Event } from './event'; /** * Plug-ins for daily learning calendars such as Daf Yomi, Mishna Yomi, Nach Yomi, etc. * * Learning schedules are provided by the `@hebcal/learning` package. */ export declare class DailyLearning { /** * Register a new learning calendar. * @param name case insensitive * @param calendar a function that returns an `Event` or `null` * @param startDate the first date for which this calendar is valid */ static addCalendar(name: string, calendar: Function, startDate?: HDate): void; /** * Returns an event from daily calendar for a given date. Returns `null` if there * is no learning from this calendar on this date. * @param name case insensitive * @param hd Hebrew Date * @param il true for Israel, false for Diaspora */ static lookup(name: string, hd: HDate, il: boolean): Event | null; static getStartDate(name: string): HDate | undefined; /** * Tests to see if learning calendar has been registered * @param name case insensitive */ static has(name: string): boolean; /** Returns the names of all calendars registered */ static getCalendars(): string[]; }