PlainYearMonth

open class PlainYearMonth(isoYear: Int, isoMonth: Int, calendar: Calendar = definedExternally, referenceISODay: Int = definedExternally) : HasArithmeticOperations<PlainYearMonth, PlainYearMonthLike, DateUnit<*>> , Localizable<DateTimeFormatOptions> (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: Calendar = definedExternally, referenceISODay: Int = definedExternally)

Types

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
external var calendarId: String
Link copied to clipboard
external var daysInMonth: Int
Link copied to clipboard
external var daysInYear: Int
Link copied to clipboard
external var era: String?
Link copied to clipboard
external var eraYear: Int?
Link copied to clipboard
external var inLeapYear: Boolean
Link copied to clipboard
external var month: Int
Link copied to clipboard
external var monthCode: String
Link copied to clipboard
external var monthsInYear: Int
Link copied to clipboard
external var year: Int

Functions

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