Temporal.PlainYearMonth.prototype.daysInYear

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 daysInYear Zugriffs-Eigenschaft von Temporal.PlainYearMonth Instanzen gibt eine positive ganze Zahl zurück, die die Anzahl der Tage im Jahr dieses Datums darstellt. Sie ist [kalender]-abhängig(/de/docs/Web/JavaScript/Reference/Global_Objects/Temporal#calendars).

Der Schreibzugriff von daysInYear ist undefined. Sie können diese Eigenschaft nicht direkt ändern.

Für allgemeine Informationen und weitere Beispiele siehe Temporal.PlainDate.prototype.daysInYear.

Beispiele

Verwendung von daysInYear

js
const ym = Temporal.PlainYearMonth.from("2021-07");
console.log(ym.daysInYear); // 365

Spezifikationen

Specification
Temporal proposal
# sec-get-temporal.plainyearmonth.prototype.daysinyear

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
daysInYear
Experimental

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