@js-sugar/date
Version:
A multi-calendar, tree-shakable, extensible, immutable and lightweight date library for JavaScript
26 lines (25 loc) • 759 B
TypeScript
/**
* @category Calendar
* @module Calendars
*/
import { Calendar } from './calendar';
/**
* A collection of calendars.
* @public
* @abstract
*/
export declare abstract class Calendars {
/** Gets or sets the default calendar. */
static set default(value: Calendar);
static get default(): Calendar;
/** Adds a [Calendar] to the calendars repository. */
static add(c: Calendar): void;
/** Finds a calendar by id. */
static find(id: string, opts?: {
strict: boolean;
}): Calendar;
/** Finds all calendars with a specific type. */
static findByType(type: string): Calendar[];
/** Returns a cloned array of all calendars in this collection. */
static get all(): Calendar[];
}