Skip to content

Extends

  • BaseOptions

Properties

calendar

ts
calendar: CalendarLike;

Temporal calendar

Inherited from

ts
t.Internal.BaseOptions.calendar

catch

ts
catch: boolean;

catch or throw Errors

Inherited from

ts
t.Internal.BaseOptions.catch

debug

ts
debug: DebugLevel;

additional console.log for tracking

Inherited from

ts
t.Internal.BaseOptions.debug

discovery

ts
discovery: string | symbol | Discovery;

globalThis Discovery Symbol

Inherited from

ts
t.Internal.BaseOptions.discovery

intl?

ts
optional intl?: IntlOptions;

internationalization configuration (relativeTime, etc.)

Inherited from

ts
t.Internal.BaseOptions.intl

license?

ts
optional license?: string;

license key for premium features

Inherited from

ts
t.Internal.BaseOptions.license

locale

ts
locale: string | string[];

locale (e.g. en-AU)

Inherited from

ts
t.Internal.BaseOptions.locale

mode?

ts
optional mode?: "auto" | "strict" | "defer";

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

Inherited from

ts
t.Internal.BaseOptions.mode

monthDay

ts
monthDay: boolean | MonthDay;

regional date-parsing configuration

Inherited from

ts
t.Internal.BaseOptions.monthDay

pivot

ts
pivot: number;

pivot year for two-digit years

Inherited from

ts
t.Internal.BaseOptions.pivot

planner?

ts
optional planner?: PlannerOptions;

parse planner configuration (layoutOrder, etc.)

Inherited from

ts
t.Internal.BaseOptions.planner

plugins

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

plugins to be automatically extended

Inherited from

ts
t.Internal.BaseOptions.plugins

registry?

ts
optional registry?: {
  events?:   | Extend<{
     christmas: "25 Dec";
     christmas ?eve: "24 Dec";
     fortnight: (this) => AliasContext;
     new.?years? ?eve: "31 Dec";
     new.?years?(?: ?day)?: "01 Jan";
     now: (this) => AliasContext;
     ny: "01 Jan";
     nye: "31 Dec";
     today: (this) => ZonedDateTime;
     tomorrow: (this) => AliasContext;
     xmas: "25 Dec";
     xmas ?eve: "24 Dec";
     yesterday: (this) => AliasContext;
   }, string, string | Function>
     | RegistryOption<Logic>;
  formats?: Property<any>;
  ignores?: Ignore;
  layouts?:   | Extend<{
   [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) => 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<{
   [key: symbol]: RegExp;
   }, symbol, RegExp>
     | RegistryOption<Pattern>;
  tokens?: Record<string, TokenEvaluator>;
};

custom data augmentation registries

events?

ts
optional events?: 
  | Extend<{
  christmas: "25 Dec";
  christmas ?eve: "24 Dec";
  fortnight: (this) => AliasContext;
  new.?years? ?eve: "31 Dec";
  new.?years?(?: ?day)?: "01 Jan";
  now: (this) => AliasContext;
  ny: "01 Jan";
  nye: "31 Dec";
  today: (this) => ZonedDateTime;
  tomorrow: (this) => AliasContext;
  xmas: "25 Dec";
  xmas ?eve: "24 Dec";
  yesterday: (this) => AliasContext;
}, string, string | Function>
| RegistryOption<Logic>;

formats?

ts
optional formats?: Property<any>;

ignores?

ts
optional ignores?: Ignore;

layouts?

ts
optional layouts?: 
  | Extend<{
[key: symbol]: string;
}, symbol, string>
| RegistryOption<Pattern>;

locales?

ts
optional locales?: Record<string, Record<string, string | Function>>;

modifiers?

ts
optional modifiers?: Record<string, string | string[]>;

periods?

ts
optional periods?: 
  | Extend<{
  after[ -]?noon: "3:00pm";
  evening: "18:00";
  half[ -]?hour: (this) => 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?

ts
optional snippets?: 
  | Extend<{
[key: symbol]: RegExp;
}, symbol, RegExp>
| RegistryOption<Pattern>;

tokens?

ts
optional tokens?: Record<string, TokenEvaluator>;

Inherited from

ts
t.Internal.BaseOptions.registry

silent

ts
silent: boolean;

suppress console output during catch

Inherited from

ts
t.Internal.BaseOptions.silent

sphere

ts
sphere: string | undefined;

hemisphere for term.qtr or term.szn

Inherited from

ts
t.Internal.BaseOptions.sphere

store

ts
store: string;

localStorage key

Inherited from

ts
t.Internal.BaseOptions.store

timeStamp?

ts
optional timeStamp?: TimeStamp;

Precision to measure timestamps (ms | us)

Inherited from

ts
t.Internal.BaseOptions.timeStamp

timeZone

ts
timeZone: TimeZoneLike;

Temporal timeZone

Inherited from

ts
t.Internal.BaseOptions.timeZone

value

ts
value: DateTime;

supplied value to parse

Inherited from

ts
t.Internal.BaseOptions.value

Released under the MIT License.