Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The monthsInYear
accessor property of Temporal.PlainDate
instances returns a positive integer representing the number of months in the year of this date. It is calendar-dependent.
For the ISO 8601 calendar, this is always 12, but in other calendar systems it may differ. For example, in calendars using leap months, leap years will have one more month than common years.
The set accessor of monthsInYear
is undefined
. You cannot change this property directly.