HTMLTimeElement: dateTime-Eigenschaft
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since October 2017.
Die
dateTime
Eigenschaft des HTMLTimeElement
Interfaces ist ein String, der das datetime
HTML-Attribut widerspiegelt und eine maschinenlesbare Form des Datums und Zeitwertes des Elements enthält.
Wert
Ein String. Für gültige String-Formate siehe die datetime
gültige Werte.
Beispiele
js
// Assumes there is <time id="t"> element in the HTML
const t = document.getElementById("t");
t.dateTime = "6w 5h 34m 5s";
Spezifikationen
Specification |
---|
HTML # dom-time-datetime |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
dateTime |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.