diff --git a/frontend/src/tools/devtools.jsx b/frontend/src/tools/devtools.jsx index c60def4..fac44fd 100644 --- a/frontend/src/tools/devtools.jsx +++ b/frontend/src/tools/devtools.jsx @@ -615,6 +615,22 @@ function DatetimeRechner({ mobile }) { }); } + // ── Tab 4: In X Stunden/Minuten ── + const [inH, setInH] = useState(''); + const [inM, setInM] = useState(''); + const inResult = (() => { + const h = parseInt(inH) || 0; + const m = parseInt(inM) || 0; + if (h === 0 && m === 0) return null; + const future = new Date(Date.now() + (h * 60 + m) * 60 * 1000); + return { + de: future.toLocaleDateString('de-DE', { timeZone:'Europe/Berlin', weekday:'long', day:'2-digit', month:'2-digit', year:'numeric' }) + + ', ' + future.toLocaleTimeString('de-DE', { timeZone:'Europe/Berlin', hour:'2-digit', minute:'2-digit' }) + ' Uhr', + unix: Math.floor(future.getTime() / 1000), + total: h * 60 + m, + }; + })(); + // ── Tab 3: Zeitdifferenz ── const [dtA, setDtA] = useState(''); const [dtATime, setDtATime] = useState(''); @@ -644,7 +660,7 @@ function DatetimeRechner({ mobile }) { const lbl = { color:'rgba(255,255,255,0.55)', fontFamily:'monospace', fontSize:10, marginBottom:4 }; const [tab, setTab] = useState('conv'); - const tabs = [{id:'conv',label:'⇄ Umrechnen'},{id:'bday',label:'🎂 Geburtstag'},{id:'diff',label:'⏱ Differenz'}]; + const tabs = [{id:'conv',label:'⇄ Umrechnen'},{id:'bday',label:'🎂 Geburtstag'},{id:'diff',label:'⏱ Differenz'},{id:'in',label:'⏩ In X Zeit'}]; return (