PlainDate

open class PlainDate(isoYear: Int, isoMonth: Int, isoDay: Int, calendar: Calendar = definedExternally) : HasArithmeticOperations<PlainDate, PlainDateLike, DateUnit<*>> , Localizable<DateTimeFormatOptions> (source)

A Temporal.PlainDate represents a calendar date. "Calendar date" refers to the concept of a date as expressed in everyday usage, independent of any time zone. For example, it could be used to represent an event on a calendar which happens during the whole day no matter which time zone it's happening in.

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

Constructors

Link copied to clipboard
constructor(isoYear: Int, isoMonth: Int, isoDay: Int, calendar: Calendar = definedExternally)

Types

Link copied to clipboard

Properties

Link copied to clipboard
external val calendarId: Calendar
Link copied to clipboard
external val day: Int
Link copied to clipboard
external val dayOfWeek: Int
Link copied to clipboard
external val dayOfYear: Int
Link copied to clipboard
external val daysInMonth: Int
Link copied to clipboard
external val daysInWeek: Int
Link copied to clipboard
external val daysInYear: Int
Link copied to clipboard
external val era: String?
Link copied to clipboard
external val eraYear: Int?
Link copied to clipboard
external val inLeapYear: Boolean
Link copied to clipboard
external val month: Int
Link copied to clipboard
external val monthCode: String
Link copied to clipboard
external val monthsInYear: Int
Link copied to clipboard
external val weekOfYear: Int
Link copied to clipboard
external val year: Int
Link copied to clipboard
external val yearOfWeek: Int

Functions

Link copied to clipboard
open external fun add(duration: Duration, options: ArithmeticOptions = definedExternally): PlainDate
open external fun add(duration: DurationLike, options: ArithmeticOptions = definedExternally): PlainDate
open external fun add(duration: String, options: ArithmeticOptions = definedExternally): PlainDate
Link copied to clipboard
Link copied to clipboard
open external fun since(other: PlainDateLike, options: DifferenceOptions<DateUnit<*>>): Duration
open external fun since(other: PlainDate, options: DifferenceOptions<DateUnit<*>>): Duration
open external fun since(other: String, options: DifferenceOptions<DateUnit<*>>): Duration
Link copied to clipboard
open external fun subtract(duration: Duration, options: ArithmeticOptions = definedExternally): PlainDate
open external fun subtract(duration: DurationLike, options: ArithmeticOptions = definedExternally): PlainDate
open external fun subtract(duration: String, options: ArithmeticOptions = definedExternally): PlainDate
Link copied to clipboard
external fun toJSON(): String
Link copied to clipboard
open external fun toLocaleString(): String

Returns a value as a string value appropriate to the host environment's current locale.

open external fun toLocaleString(locales: UnicodeBCP47LocaleIdentifier, options: DateTimeFormatOptions = definedExternally): String

Converts a value to a string by using the current or specified locale.

open external fun toLocaleString(locales: ReadonlyArray<UnicodeBCP47LocaleIdentifier>, options: DateTimeFormatOptions = definedExternally): String
open external fun toLocaleString(locales: ReadonlyArray<Locale>, options: DateTimeFormatOptions = definedExternally): String
open external fun toLocaleString(locales: Locale, options: DateTimeFormatOptions = definedExternally): String
Link copied to clipboard
external fun toPlainDateTime(temporalTime: PlainTime = definedExternally): PlainDateTime
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
external fun toString(options: ShowCalendarOption = definedExternally): String
Link copied to clipboard
external fun toZonedDateTime(timeZoneAndTime: JsAny): ZonedDateTime
Link copied to clipboard
open external fun until(other: PlainDateLike, options: DifferenceOptions<DateUnit<*>>): Duration
open external fun until(other: PlainDate, options: DifferenceOptions<DateUnit<*>>): Duration
open external fun until(other: String, options: DifferenceOptions<DateUnit<*>>): Duration
Link copied to clipboard
external fun with(dateLike: PlainDateLike, options: AssignmentOptions = definedExternally): PlainDate
Link copied to clipboard
external fun withCalendar(calendar: Calendar): PlainDate