Loading lesson path
Temporal.PlainYearMonth
Temporal.PlainYearMonth object represents the year and month of an ISO 8601 calendar date, without a day or a time zone (e.g
Formula
2026 - 05). The Temporal.PlainYearMonth Object
Temporal.PlainYearMonth object is a time and year object. It represents the year and month of an ISO 8601 calendar date, without a day or a time zone.
Formula
2026 - 05.const date = new Temporal.PlainYearMonth(2026, 5);Temporal.PlainMonthDay Properties
const date = new Temporal.PlainYearMonth(2026,5);The Temporal.PlainYearMonth Format
Formula
(an extension to the ISO 8601 / RFC 3339 format):Formula
YYYY - MM[u - ca = calendar_id]Returns a new PlainDate object from another object or a string toPlainDate()
Returns a new PlainDate with specified fields modified
Returns a new PlainDate with a duration added subtract() Returns a new PlainDate with a duration subtracted
Formula
Returns - 1, 0, or 1 from comparing two dates equals()Returns true if two PlainDate objects are identical since()
Returns an RFC 9557 format string for JSON serialization toLocaleString()
Formula
Returns a language - sensitive representation of the date toString()Returns an RFC 9557 format string representation valueOf() Throws a TypeError (prevents temporals from being converted to primitives)