Temporal.PlainYearMonth.prototype.daysInMonth
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimentell: Dies ist eine experimentelle Technologie
Überprüfen Sie die Browser-Kompatibilitätstabelle sorgfältig vor der Verwendung auf produktiven Webseiten.
Die daysInMonth Accessor-Eigenschaft von Temporal.PlainYearMonth Instanzen gibt eine positive ganze Zahl zurück, die die Anzahl der Tage im Monat dieses Datums darstellt. Sie ist kalender-abhängig.
Der Set-Accessor von daysInMonth ist undefined. Sie können diese Eigenschaft nicht direkt ändern.
Für allgemeine Informationen und weitere Beispiele, siehe Temporal.PlainDate.prototype.daysInMonth.
Beispiele
>Verwendung von daysInMonth
js
const ym = Temporal.PlainYearMonth.from("2021-07");
console.log(ym.daysInMonth); // 31
Spezifikationen
| Specification |
|---|
| Temporal> # sec-get-temporal.plainyearmonth.prototype.daysinmonth> |
Browser-Kompatibilität
Loading…
Siehe auch
Temporal.PlainYearMonthTemporal.PlainYearMonth.prototype.with()Temporal.PlainYearMonth.prototype.add()Temporal.PlainYearMonth.prototype.subtract()Temporal.PlainYearMonth.prototype.yearTemporal.PlainYearMonth.prototype.monthTemporal.PlainYearMonth.prototype.daysInYearTemporal.PlainDate.prototype.daysInMonth