Temporal.PlainDateTime.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 Zugriffsproperty daysInYear
von Temporal.PlainDateTime
Instanzen gibt eine positive Ganzzahl zurück, die die Anzahl der Tage im Jahr dieses Datums darstellt. Sie ist abhängig vom Kalender.
Der Set-Accessor 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
const dt = Temporal.PlainDateTime.from("2021-07-01");
console.log(dt.daysInYear); // 365
Spezifikationen
Specification |
---|
Temporal proposal # sec-get-temporal.plaindatetime.prototype.daysinyear |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
daysInYear |
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.PlainDateTime
Temporal.PlainDateTime.prototype.with()
Temporal.PlainDateTime.prototype.add()
Temporal.PlainDateTime.prototype.subtract()
Temporal.PlainDateTime.prototype.year
Temporal.PlainDateTime.prototype.dayOfYear
Temporal.PlainDateTime.prototype.daysInMonth
Temporal.PlainDateTime.prototype.daysInWeek
Temporal.PlainDate.prototype.daysInYear