Temporal.PlainYearMonth.prototype.year

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Thuộc tính accessor year của các instance Temporal.PlainYearMonth trả về một số nguyên biểu diễn số năm của năm-tháng này tính từ đầu một năm epoch cụ thể theo calendar. Giá trị này phụ thuộc vào calendar.

Set accessor của yearundefined. Bạn không thể thay đổi thuộc tính này trực tiếp. Hãy dùng phương thức with() để tạo một đối tượng Temporal.PlainYearMonth mới với giá trị mong muốn.

Để biết thêm thông tin chung và ví dụ, hãy xem Temporal.PlainDate.prototype.year.