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 GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
dateTime

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Has more compatibility info.

Siehe auch