TemporalZ

PlainYearMonth

The Temporal.PlainYearMonth object represents a particular month in a specific year, with no day or time.

See: Temporal.PlainYearMonth

Fields

#
_inner:*abi.c.PlainYearMonth
*abi.c.PlainYearMonth

Types

#

Functions

#
init

Creates a new PlainYearMonth from the given year, month, and optional calendar.

from

Parses a PlainYearMonth from a string.

compare

Compares two PlainYearMonth instances by their ISO date values.

equals

Returns true if this PlainYearMonth is equal to another (same ISO date and calendar).

add

Returns a new PlainYearMonth moved forward by the given duration.

subtract

Returns a new PlainYearMonth moved backward by the given duration.

until

Returns the duration from this PlainYearMonth to another.

since

Returns the duration from another PlainYearMonth to this one.

calendarId

Returns the calendar identifier used to interpret the internal ISO 8601 date.

year

Returns the year of this year-month relative to the calendar's epoch.

month

Returns the 1-based month index in the year of this year-month.

monthCode

Returns the calendar-specific string representing the month of this year-month.

daysInMonth

Returns the number of days in the month of this year-month.

daysInYear

Returns the number of days in the year of this year-month.

monthsInYear

Returns the number of months in the year of this year-month.

inLeapYear

Returns true if this year-month is in a leap year.

era

Returns the calendar-specific era of this year-month, or null if not applicable.

eraYear

Returns the year of this year-month within the era, or null if not applicable.

with

Returns a new PlainYearMonth with some fields replaced by new values.

toPlainDate

Returns a PlainDate representing this year-month and a supplied day in the same calendar system.

toString

Returns a string representing this year-month in RFC 9557 format.

toJSON

Returns a JSON string representing this year-month.

toLocaleString

Returns a locale-sensitive string representing this year-month.

valueOf

Throws a TypeError, as PlainYearMonth objects cannot be converted to primitive values.

Aliases

#
RoundingMode

RoundingMode

DifferenceSettings

DifferenceSettings

RoundOptions

RoundingOptions