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
Zugriffs-Eigenschaft von Temporal.PlainYearMonth
Instanzen gibt eine positive ganze Zahl zurück, die die Anzahl der Tage im Monat dieses Datums darstellt. Sie ist kalenderabhängig (calendar).
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
const ym = Temporal.PlainYearMonth.from("2021-07");
console.log(ym.daysInMonth); // 31
Spezifikationen
Specification |
---|
Temporal proposal # sec-get-temporal.plainyearmonth.prototype.daysinmonth |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
daysInMonth |
Legend
Tip: you can click/tap on a cell for more information.
- No support
- No support
- Experimental. Expect behavior to change in the future.
- See implementation notes.
- User must explicitly enable this feature.
Siehe auch
Temporal.PlainYearMonth
Temporal.PlainYearMonth.prototype.with()
Temporal.PlainYearMonth.prototype.add()
Temporal.PlainYearMonth.prototype.subtract()
Temporal.PlainYearMonth.prototype.year
Temporal.PlainYearMonth.prototype.month
Temporal.PlainYearMonth.prototype.daysInYear
Temporal.PlainDate.prototype.daysInMonth