Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The year accessor property of Temporal.PlainDate instances returns an integer representing the number of years of this date relative to the start of a calendar-specific epoch year. It is calendar-dependent.
This property has the same function as the era/eraYear pair as a unique identifier of a year in a calendar. Usually year 1 is either the first year of the latest era or the ISO 8601 year 0001. Because year is relative to the start of the epoch year, not the epoch date, if the epoch is in the middle of the year, that year will have the same value before and after the start date of the era.
The set accessor of year is undefined. You cannot change this property directly. Use the with() method to create a new Temporal.PlainDate object with the desired new value.