PlainYearMonth

external class PlainYearMonth(isoYear: Int, isoMonth: Int, calendar: CalendarLike = definedExternally, referenceISODay: Int = definedExternally) : HasArithmeticOperations<PlainYearMonth, PlainYearMonthLike, DateUnit<*>> , Localizable<DateTimeFormatOptions> , CalendarLike(source)

A Temporal.PlainYearMonth represents a particular month on the calendar. For example, it could be used to represent a particular instance of a monthly recurring event, like "the June 2019 meeting".

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

Constructors

Link copied to clipboard
constructor(isoYear: Int, isoMonth: Int, calendar: CalendarLike = definedExternally, referenceISODay: Int = definedExternally)

Types

Link copied to clipboard
Link copied to clipboard

Properties

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
val year: Int

Functions

Link copied to clipboard
open fun add(duration: Duration, options: ArithmeticOptions = definedExternally): PlainYearMonth
open fun add(duration: DurationLike, options: ArithmeticOptions = definedExternally): PlainYearMonth
open fun add(duration: String, options: ArithmeticOptions = definedExternally): PlainYearMonth
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun since(other: PlainYearMonth, 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): PlainYearMonth
open fun subtract(duration: DurationLike, options: ArithmeticOptions = definedExternally): PlainYearMonth
open fun subtract(duration: String, options: ArithmeticOptions = definedExternally): PlainYearMonth
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
Link copied to clipboard
fun toString(options: ShowCalendarOption = definedExternally): String
Link copied to clipboard
open fun until(other: PlainYearMonth, options: DifferenceOptions<DateUnit<*>>): Duration
open fun until(other: String, options: DifferenceOptions<DateUnit<*>>): Duration
Link copied to clipboard
fun with(yearMonthLike: PlainYearMonthLike, options: AssignmentOptions = definedExternally): PlainYearMonth