PlainDate

external class PlainDate(isoYear: Int, isoMonth: Int, isoDay: Int, calendar: CalendarLike = definedExternally) : HasArithmeticOperations<PlainDate, PlainDateLike, DateUnit<*>> , Localizable<DateTimeFormatOptions> , CalendarLike(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: CalendarLike = definedExternally)

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
val day: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val era: String?
Link copied to clipboard
val eraYear: Int?
Link copied to clipboard
Link copied to clipboard
val month: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val year: Int
Link copied to clipboard

Functions

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

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

open fun toLocaleString(locales: Locale, options: DateTimeFormatOptions = definedExternally): String
open fun toLocaleString(locales: ReadonlyArray<Locale>, options: DateTimeFormatOptions = definedExternally): String
open fun toLocaleString(locales: ReadonlyArray<UnicodeBCP47LocaleIdentifier>, options: DateTimeFormatOptions = definedExternally): String

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

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

Link copied to clipboard
fun toPlainDateTime(temporalTime: PlainTime = definedExternally): PlainDateTime
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun toString(options: ShowCalendarOption = definedExternally): String
Link copied to clipboard
fun toZonedDateTime(timeZoneAndTime: Any): ZonedDateTime
Link copied to clipboard
open fun until(other: PlainDate, options: DifferenceOptions<DateUnit<*>>): Duration
open fun until(other: PlainDateLike, options: DifferenceOptions<DateUnit<*>>): Duration
open fun until(other: String, options: DifferenceOptions<DateUnit<*>>): Duration
Link copied to clipboard
fun with(dateLike: PlainDateLike, options: AssignmentOptions = definedExternally): PlainDate
Link copied to clipboard