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.
Temporal Calendar ID (e.g., 'iso8601' | 'gregory')
current Tempo configuration
Day of the month (1-31)
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, ... })
Hour of the day (0-23)
Resolved cultural and regional locale information (firstDay, weekend, direction, etc.) via Intl.LocaleInfo
Standard ISO 8601 string in UTC
true if the underlying date-time is valid.
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 since Unix epoch (BigInt)
Nanoseconds of the microsecond (0-999)
Instance-specific parse rules (merged with global)
current range key for every registered term
Resolved hemisphere ('north' | 'south' | undefined)
Seconds of the minute (0-59)
Keyed results for all resolved terms
list of registered terms and their available range keys
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')
Short weekday name (e.g., 'Mon')
iso week number of the year
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
StaticCACHEcache operation modes
Staticconfigglobal Tempo configuration
StaticdefaultTempo initial default settings
Staticdiscoveryglobal discovery configuration
Staticepochstatic units since Unix epoch
StaticFORMATPre-configured format {name -> string} pairs
Staticignoresstatic Tempo.ignores (registry)
Staticinstantget the current system Instant
StaticintlResolved cultural and regional locale information for the global locale via Intl.LocaleInfo
StaticLIMITsome useful Dates
StaticMODEinitialization strategies
StaticMONTH_regional date-parsing configuration
StaticNUMBERNumber names (0-10)
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)
StaticTIMEZONETimeZone aliases
Staticversionthe version of this Tempo build (stamped at build-time from package.json)
Staticversionsthe active versions of Tempo and any registered plugins or modules
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: OptionsReturns a clone of the current Tempo instance.
apply 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.
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
Optionaldiscovery?: string | symbol | DiscoveryglobalThis Discovery Symbol
Optional Readonlygeo?: Readonly<GeoConfig>Geolocation coordinates configuration
Optional Readonlyintl?: Readonly<IntlOptions>internationalization configuration (relativeTime, etc.)
Readonlylocale: string | readonly string[]locale (e.g. en-AU)
OptionallocaleInfo?: booleanenable regional calendar boundaries (week start/end/mid) via Intl.LocaleInfo
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: string | 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[hasChecks if an instance is a Tempo object using the brand symbol. Allows instanceof to work across module boundaries.
The instance to check
True if the instance is a Tempo object
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).
Optionaltempo1: Options | DateTimeOptionaltempo2: Options | DateTimeStaticcreate🏭 Sandbox Factory & Scoped Execution Mode
Factory Mode: Creates 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, creates 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: Creates 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, creates 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: Creates 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, creates an isolated sandbox, executes the callback, and automatically disposes the sandbox upon completion (supporting both synchronous and Promise returns).
StaticextendStaticfromStaticinitReset Tempo to its default, built-in registration state
Staticischeck if a supplied variable is a valid Tempo instance
Optionalinstance: anyStaticnowGets the current timestamp in the specified unit.
The time unit ('ss', 'ms', 'us').
The current timestamp as a number (for 'ss', 'ms', 'us')
Gets the current timestamp in the specified unit.
Optionalunit: "ns"
The time unit ('ss', 'ms', 'us', 'ns'). Defaults to 'ns' (nanoseconds).
The current timestamp as a number (for 'ss', 'ms', 'us') or bigint (for 'ns')
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.