Temporal.Calendar - Web documentation
class Temporal.Calendar
implements CalendarProtocol
Unstable

A Temporal.Calendar is a representation of a calendar system. It includes information about how many days are in each year, how many months are in each year, how many days are in each month, and how to do arithmetic in that calendar system.

See https://tc39.es/proposal-temporal/docs/calendar.html for more details.

Constructors

new
Calendar(calendarIdentifier: string)

Properties

readonly
[Symbol.toStringTag]: "Temporal.Calendar"
readonly
id: string

Methods

dateUntil(
options?: DifferenceOptions<
"year"
| "month"
| "week"
| "day"
>
,
): Temporal.Duration
era(date: ): string | undefined
eraYear(date: ): number | undefined
fields(fields: Iterable<string>): string[]
mergeFields(
fields: Record<string, unknown>,
additionalFields: Record<string, unknown>,
): Record<string, unknown>
toJSON(): string
toString(): string

Static Methods