let date = new Date(0);
let instant = date.toTemporalInstant();
let zonedDateTime = instant.toZonedDateTimeISO(timeZone);
let plainDateTime = zonedDateTime.toPlainDateTime();
let plainDate = zonedDateTime.toPlainDate();
for (let locale of locales) {
let expected = date.toLocaleDateString(locale, {timeZone});
assertEq(plainDate.toLocaleString(locale, {timeZone}), expected);
for (let opts of options) {
let expected = date.toLocaleDateString(locale, {timeZone, ...opts});
assertEq(instant.toLocaleString(locale, {timeZone, ...opts}), expected);
assertEq(zonedDateTime.toLocaleString(locale, {...opts}), expected);
assertEq(plainDateTime.toLocaleString(locale, {timeZone, ...opts}), expected);
assertEq(plainDate.toLocaleString(locale, {timeZone, ...opts}), expected);
}
}
if (typeof reportCompare === "function")
reportCompare(true, true);
Messung V0.5
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.