Temporal.PlainYearMonth.prototype.daysInYear
Khả dụng hạn chế
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Thuộc tính truy cập daysInYear của các thực thể Temporal.PlainYearMonth trả về một số nguyên dương đại diện cho số ngày trong năm của ngày này. Nó phụ thuộc vào lịch.
Set accessor của daysInYear là undefined. Bạn không thể thay đổi thuộc tính này trực tiếp.
Để biết thông tin chung và thêm ví dụ, xem Temporal.PlainDate.prototype.daysInYear.
Ví dụ
>Sử dụng daysInYear
js
const ym = Temporal.PlainYearMonth.from("2021-07");
console.log(ym.daysInYear); // 365
Đặc tả
| Thông số kỹ thuật |
|---|
| Temporal> # sec-get-temporal.plainyearmonth.prototype.daysinyear> |