Files
datascape/assets/editor/dates.js
2026-04-15 09:14:24 +02:00

18 lines
482 B
JavaScript

window.EditorDates = (function () {
function pad2(n) { return n < 10 ? '0' + n : '' + n; }
function isoDate() {
var d = new Date();
return d.getFullYear() + '-' + pad2(d.getMonth() + 1) + '-' + pad2(d.getDate());
}
function longDate() {
return new Date().toLocaleDateString('de-DE', {
weekday: 'long', year: 'numeric', month: 'long', day: 'numeric'
});
}
return { isoDate: isoDate, longDate: longDate };
})();