Instantiates a new Tempo object with configuration only.
Optionaloptions: Options
Configuration options for this specific instance.
Instantiates a new Tempo object with a value.
The date-time value to parse.
Optionaloptions: Options
Configuration options for this specific instance.
StaticIntervalInterval class for checking overlaps and bounds between Temporal points
Staticischeck if a supplied variable is a valid Tempo sandbox subclass or instance
Checks if the given value carries the Tempo Sandbox brand. The brand key is a global Symbol.for key, so any object that sets it also passes. Do not use this check alone to validate untrusted input. Uses brand checking via the $Sandbox symbol.
Optionalsandbox: any
The value to check
True if the value is a Tempo sandbox instance or subclass
Temporal Calendar ID (e.g., 'iso8601' | 'gregory')
current Tempo configuration
Day of the month (1-31)
Days in current month, using instance calendar.
Days in current year, using instance calendar.
iso weekday number: Mon=1, Sun=7
Day of year: 1-366
Year within the era (positive integer)
units since epoch for this date-time instance
Era string for the calendar (e.g., 'ce', 'bce')
Fractional seconds (e.g., 0.123456789)
Formatted results for all pre-defined format codes
Resolved geographic coordinates object ({ latitude, longitude, elevation, sphere, ... })
Hour of the day (0-23)
Internationalization namespace (info, locale)
Standard ISO 8601 string in UTC
true if the underlying date-time is valid.
Julian day number for the local ISO calendar date.
Resolved BCP 47 locale (e.g., 'en-US')
Minutes of the hour (0-59)
Month number: Jan=1, Dec=12
Short month name (e.g., 'Jan')
Full month name (e.g., 'January')
Milliseconds of the second (0-999)
Nanoseconds of the microsecond (0-999)
Instance-specific parse rules (merged with global)
Resolved hemisphere ('north' | 'south' | undefined)
Seconds of the minute (0-59)
Keyed results for all resolved terms
Unix timestamp (defaults to milliseconds)
IANA Time Zone ID (e.g., 'Australia/Sydney')
Microseconds of the millisecond (0-999)
Full weekday name (e.g., 'Monday')
ISO week number of the year
Short weekday name (e.g., 'Mon')
4-digit ISO week-numbering year
4-digit year (e.g., 2024)
returns the underlying Temporal.ZonedDateTime
Staticcachehigh-performance in-memory cache facade for glossary and dynamic parse results
Staticconfigglobal Tempo configuration
StaticdefaultTempo initial default settings
Staticdiscoveryglobal discovery configuration
StaticEnumEnum reflection and helper suite
StaticenumsLive registry enumerations
cache operation modes
cardinal directions
number of seconds in a time unit
number of milliseconds in a time unit
common format aliases
Temporal limits (min/max date bounds)
localized dictionary translations
initialization strategies
Gregorian calendar months (short-form)
regional month-day-year parsing settings
Gregorian calendar months (long-form)
number names (0-10)
ordinal names
calendar seasons
common time-zone aliases
Gregorian calendar week-days (short-form)
Gregorian calendar week-days (long-form)
Staticepochstatic units since Unix epoch
Staticignoresstatic Tempo.ignores (registry)
Staticinstantget the current system Instant
StaticintlInternationalization namespace (info, locale, and cultural metadata) for the global locale
StaticoptionsRetrieves the merged options for this Tempo class, combining defaults, storage, discovery, and config.
The complete options object for Tempo initialization
Staticparseconfiguration governing the static 'rules' used when parsing t.DateTime argument
Staticpropertiesstatic Tempo properties getter
Staticregistrystatic Tempo.registry
Statictermsstatic Tempo.terms (registry)
Staticversionthe version of this Tempo build (stamped at build-time from package.json)
Staticversionsthe active versions of Tempo and any registered plugins or modules
Staticweakweakly-retained object cache facade for domain objects, ASTs, and plugin instances
iterate over instance formats
allow for auto-convert of Tempo to BigInt, Number or String
Optionalhint: "string" | "number" | "default"returns a new Tempo with specific duration added.
Optionaltempo: MutateAddOptionaloptions: Optionschecks whether this Tempo matches now at the requested unit or options precision.
checks whether this Tempo matches another date-time value (at full instant or optional unit precision).
Optionalother: Options | DateTimeOptionalunit: CompareUnit | CompareOptionsapply a custom format.
Optionalfmt: anyOptionaloptions: anyapplies a format to the instance.
Applies a format to the instance.
Format strings are validated at compile time — any unrecognised {token}
will produce an IDE error showing the bad token name.
TempoFormatTokens to extend the token set.
applies a format to the instance (zero-argument — returns a pre-built format proxy).
Computes the next occurrence of a recurrence rule (RRULE string) after this instant.
The RFC 5545 RRULE string or object with an rrule property
A new Tempo instance at the next occurrence, or null if no further occurrences exist
returns a new Tempo with specific offsets.
Optionaltempo: MutateSetOptionaloptions: Optionsexplicitly enable/disable "catch" mode for this instance
time elapsed since another date-time
OptionaldateTimeOrOpts: Options | DateTimeOptionalopts: Optionstime elapsed since another date-time
Optionalopts: Optionstime elapsed since another date-time
time elapsed since (with unit)
Optionalopts: Optionstime elapsed since another date-time (with unit)
time elapsed since another date-time (w'out unit)
OptionaldateTimeOrOpts: Options | DateTimeOptionalopts: Optionstime elapsed since another date-time
OptionaloptsOrDate: anyOptionaloptsOrUntil: anyreturns a new Tempo with specific duration subtracted.
Optionaltempo: MutateAddOptionaloptions: Optionsthe date-time as a standard Date object.
returns the underlying Temporal.ZonedDateTime
returns the underlying Temporal.Instant
Custom JSON serialization for JSON.stringify.
Readonlycalendar: CalendarLikeTemporal calendar
Optionalcatch?: booleancatch or throw Errors
Optionaldebug?: DebugLeveladditional console.log for tracking
Optionaldialect?: Evaluable<string>Format dialect or dynamic dialect resolver (e.g. 'ldml', 'strftime', 'moment')
Optionaldiscovery?: string | symbol | DiscoveryglobalThis Discovery Symbol
Optionalformat?: Evaluable<string | readonly string[]>Format mask, array of format masks, or dynamic mask resolver
Optional Readonlygeo?: Readonly<GeoConfig>Geolocation coordinates configuration
Optional Readonlyintl?: Readonly<IntlOptions>internationalization configuration (relativeTime, etc.)
Readonlylocale: string | readonly string[]locale (e.g. en-AU)
Optionalmode?: "auto" | "strict" | "defer"initialization strategy ('auto'|'strict'|'defer')
Optional Readonlyplanner?: Readonly<PlannerOptions>parse planner configuration (layoutOrder, etc.)
OptionalpluginOptions?: Record<string, any>Plugin configuration defaults and dictionaries keyed by plugin name
Optionalplugins?: anyPlugins or terms to extend onto Tempo.
Readonlyregistry: Readonly<custom data augmentation registries
Readonlyscope: "global" | "local"scope for configuration mutations
Optionalsilent?: booleansuppress console output during catch
Readonlysphere: COMPASS | undefinedhemisphere for term.qtr or term.szn
Optionalstore?: stringlocalStorage key
OptionaltimeStamp?: TimeStampPrecision to measure timestamps (ms | us)
ReadonlytimeZone: TimeZoneLikeTemporal timeZone
the current system time localized to this instance.
returns a Temporal.PlainDate representation
returns a Temporal.PlainDateTime representation
returns a Temporal.PlainTime representation
iso8601 string representation of the date-time.
time duration until another date-time
OptionaldateTimeOrOpts: Options | DateTimeOptionalopts: Optionstime duration until another date-time
Optionalopts: Optionstime duration until another date-time
time duration until (returns Duration)
OptionaldateTimeOrOpts: Options | DateTimeOptionalopts: Optionstime duration until (with unit, returns number)
Optionalopts: Optionstime duration until another date-time (with unit)
fallback: union of possible returns
OptionaloptsOrDate: OptionaloptsOrUntil: Options | UntilStatic[dispose]release global config and reset library to defaults
Static[iterator]iterate over Tempo properties
StaticbootstrapAutomatically discovers and loads configuration from tempo.config.*
before initializing the engine.
Optionaloptions: { configFile?: string; cwd?: string }StaticcompareCompares two Tempo instances or date-time values. Returns -1 (earlier), 0 (equal), or 1 (later).
When unit (or { unit, timeZone, calendar, anchor }) is provided, compares at that calendar/time granularity (e.g. 'day', 'month', 'time').
Optionaltempo1: Options | DateTimeOptionaltempo2: Options | DateTimeOptionalunit: CompareUnit | CompareOptionsStaticequalsDetermines whether two Tempo instances or date-time values represent the same instant or matching unit boundary.
Optionaltempo1: Options | DateTimeOptionaltempo2: Options | DateTimeOptionalunit: CompareUnit | CompareOptionsStaticextend🏭 Sandbox Factory & Scoped Execution Mode
Factory Mode: Derives a fresh, isolated Tempo subclass with its own configuration and registries.
The returned class implements Disposable ([Symbol.dispose]()), allowing deterministic cleanup via using.
Scoped Execution Mode: When provided a callback, derives an isolated sandbox, executes the callback, and automatically disposes the sandbox upon completion (supporting both synchronous and Promise returns).
Optionaloptions: Options🏭 Sandbox Factory & Scoped Execution Mode
Factory Mode: Derives a fresh, isolated Tempo subclass with its own configuration and registries.
The returned class implements Disposable ([Symbol.dispose]()), allowing deterministic cleanup via using.
Scoped Execution Mode: When provided a callback, derives an isolated sandbox, executes the callback, and automatically disposes the sandbox upon completion (supporting both synchronous and Promise returns).
🏭 Sandbox Factory & Scoped Execution Mode
Factory Mode: Derives a fresh, isolated Tempo subclass with its own configuration and registries.
The returned class implements Disposable ([Symbol.dispose]()), allowing deterministic cleanup via using.
Scoped Execution Mode: When provided a callback, derives an isolated sandbox, executes the callback, and automatically disposes the sandbox upon completion (supporting both synchronous and Promise returns).
StaticfromStaticinitReset Tempo to its default, built-in registration state
StaticisType guard to check if a supplied variable is a valid Tempo instance
Optionalinstance: unknownStaticnowCreates a new Tempo instance representing the current date and time.
Optionaloptions: Omit<Options, "value">
Configuration options for this specific instance.
StaticreadyWait for engine readiness.
The final status ('none' in Community Tempo)
Staticregexptranslates {layout} into an anchored, case-insensitive RegExp.
Optionalsnippet: Extend<{ readonly [key: symbol]: RegExp }, symbol, RegExp>Staticsetexplicitly enable/disable "catch" mode for internal errors
StaticuseRegister discovery configuration with an optional discovery symbol.
Discovery object defining options, formats, periods, or terms.
Optionalsymbol: symbol
Optional symbol identifier under globalThis to attach discovery data.
Register an individual plugin or plugin factory.
The plugin function or definition to register.
Optionaloptions: Options
Optional configuration for the plugin.
Register an array of plugins, terms, factories, or tuples.
An array of plugins, terms, factories, or tuples to register.
Optionaloptions: Options
Optional configuration for the plugins.
Register multiple plugins or term extensions.
A plugin, term, or list of extensions to register.
A powerful wrapper around
Temporal.ZonedDateTimefor flexible parsing and intuitive manipulation of date-time objects. Bridges the gap between raw string/number inputs and the strict requirements of the ECMAScript Temporal API.