Tempo API
    Preparing search index...

    Interface BaseOptions

    interface BaseOptions {
        calendar: CalendarLike;
        catch: boolean;
        debug: DebugLevel;
        discovery: string | symbol | Discovery;
        intl?: IntlOptions;
        license?: string;
        locale: string | string[];
        mode?: "auto" | "strict" | "defer";
        monthDay: boolean | MonthDay;
        pivot: number;
        planner?: PlannerOptions;
        plugins: TempoPlugin | TermPlugin | (TempoPlugin | TermPlugin)[];
        registry?: {
            events?:
                | Extend<
                    {
                        christmas: "25 Dec";
                        "christmas ?eve": "24 Dec";
                        fortnight: (this: AliasContext) => AliasContext;
                        "new.?years? ?eve": "31 Dec";
                        "new.?years?(?: ?day)?": "01 Jan";
                        now: (this: AliasContext) => AliasContext;
                        ny: "01 Jan";
                        nye: "31 Dec";
                        today: (this: AliasContext) => ZonedDateTime;
                        tomorrow: (this: AliasContext) => AliasContext;
                        xmas: "25 Dec";
                        "xmas ?eve": "24 Dec";
                        yesterday: (this: AliasContext) => AliasContext;
                    },
                    string,
                    string
                    | Function,
                >
                | RegistryOption<Logic>;
            formats?: Property<any>;
            ignores?: Ignore;
            layouts?:
                | Extend<{ readonly [key: symbol]: string }, symbol, string>
                | RegistryOption<Pattern>;
            locales?: Record<string, Record<string, string | Function>>;
            modifiers?: Record<string, string | string[]>;
            periods?:
                | Extend<
                    {
                        "after[ -]?noon": "3:00pm";
                        evening: "18:00";
                        "half[ -]?hour": (this: AliasContext) => string;
                        "mid[ -]?day": "12:00";
                        "mid[ -]?morning": "10:00";
                        "mid[ -]?night": "24:00";
                        morning: "8:00";
                        night: "20:00";
                        noon: "12:00";
                    },
                    string,
                    string
                    | Function,
                >
                | RegistryOption<Logic>;
            snippets?:
                | Extend<{ readonly [key: symbol]: RegExp }, symbol, RegExp>
                | RegistryOption<Pattern>;
            tokens?: Record<string, TokenEvaluator>;
        };
        silent: boolean;
        sphere: string
        | undefined;
        store: string;
        timeStamp?: TimeStamp;
        timeZone: TimeZoneLike;
        value: DateTime;
    }

    Hierarchy

    • BaseOptions
      • BaseOptions
    Index

    Properties

    calendar: CalendarLike

    Temporal calendar

    catch: boolean

    catch or throw Errors

    debug: DebugLevel

    additional console.log for tracking

    discovery: string | symbol | Discovery

    globalThis Discovery Symbol

    intl?: IntlOptions

    internationalization configuration (relativeTime, etc.)

    license?: string

    license key for premium features

    locale: string | string[]

    locale (e.g. en-AU)

    mode?: "auto" | "strict" | "defer"

    initialization strategy ('auto'|'strict'|'defer')

    monthDay: boolean | MonthDay

    regional date-parsing configuration

    pivot: number

    pivot year for two-digit years

    planner?: PlannerOptions

    parse planner configuration (layoutOrder, etc.)

    plugins: TempoPlugin | TermPlugin | (TempoPlugin | TermPlugin)[]

    plugins to be automatically extended

    registry?: {
        events?:
            | Extend<
                {
                    christmas: "25 Dec";
                    "christmas ?eve": "24 Dec";
                    fortnight: (this: AliasContext) => AliasContext;
                    "new.?years? ?eve": "31 Dec";
                    "new.?years?(?: ?day)?": "01 Jan";
                    now: (this: AliasContext) => AliasContext;
                    ny: "01 Jan";
                    nye: "31 Dec";
                    today: (this: AliasContext) => ZonedDateTime;
                    tomorrow: (this: AliasContext) => AliasContext;
                    xmas: "25 Dec";
                    "xmas ?eve": "24 Dec";
                    yesterday: (this: AliasContext) => AliasContext;
                },
                string,
                string
                | Function,
            >
            | RegistryOption<Logic>;
        formats?: Property<any>;
        ignores?: Ignore;
        layouts?:
            | Extend<{ readonly [key: symbol]: string }, symbol, string>
            | RegistryOption<Pattern>;
        locales?: Record<string, Record<string, string | Function>>;
        modifiers?: Record<string, string | string[]>;
        periods?:
            | Extend<
                {
                    "after[ -]?noon": "3:00pm";
                    evening: "18:00";
                    "half[ -]?hour": (this: AliasContext) => string;
                    "mid[ -]?day": "12:00";
                    "mid[ -]?morning": "10:00";
                    "mid[ -]?night": "24:00";
                    morning: "8:00";
                    night: "20:00";
                    noon: "12:00";
                },
                string,
                string
                | Function,
            >
            | RegistryOption<Logic>;
        snippets?:
            | Extend<{ readonly [key: symbol]: RegExp }, symbol, RegExp>
            | RegistryOption<Pattern>;
        tokens?: Record<string, TokenEvaluator>;
    }

    custom data augmentation registries

    silent: boolean

    suppress console output during catch

    sphere: string | undefined

    hemisphere for term.qtr or term.szn

    store: string

    localStorage key

    timeStamp?: TimeStamp

    Precision to measure timestamps (ms | us)

    timeZone: TimeZoneLike

    Temporal timeZone

    value: DateTime

    supplied value to parse