feat: Hinzufügen der detaillierten aktuellen Uhrzeit mit Zeitzoneninformation im Format "dd.mm.yyyy, hh:mm:ss GMT+X".

This commit is contained in:
Developer 02
2024-07-18 17:21:54 +02:00
parent 9b28c0a1d1
commit 35ced9b9ad
3 changed files with 14 additions and 10 deletions

View File

@@ -46,13 +46,17 @@ async function getLocation() {
}
const getLocaleDateString = _ => new Date().toLocaleDateString('de-DE')
function locale_date_dd_mm_yyyy() {
const today = new Date();
const day = String(today.getDate()).padStart(2, '0');
const month = String(today.getMonth() + 1).padStart(2, '0');
const year = String(today.getFullYear()).slice(-4);
return `${day}/${month}/${year}`;
function detailedCurrentDate() {
return new Intl.DateTimeFormat('de-DE', {
day: '2-digit',
month: '2-digit',
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
timeZoneName: 'shortOffset'
}).format();
}
let __is_mobile = null;