Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/tsc/dts/lib.deno.unstable.d.ts>Temporal.Calendar

A modern runtime for JavaScript and TypeScript.
Latest
class Temporal.Calendar
implements CalendarProtocol
import { Temporal } from "https://deno.land/x/deno@v1.41.0/cli/tsc/dts/lib.deno.unstable.d.ts";
const { Calendar } = Temporal;

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
id: string
readonly
[Symbol.toStringTag]: "Temporal.Calendar"

Methods

dateFromFields(fields: YearOrEraAndEraYear & MonthOrMonthCode & { day: number; }, options?: AssignmentOptions): Temporal.PlainDate
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>
monthDayFromFields(fields: MonthCodeOrMonthAndYear & { day: number; }, options?: AssignmentOptions): Temporal.PlainMonthDay
toJSON(): string
toString(): string
yearMonthFromFields(fields: YearOrEraAndEraYear & MonthOrMonthCode, options?: AssignmentOptions): Temporal.PlainYearMonth