Fix: users.geburtstag Migration + Format TT.MM statt MM-DD

- database.py: ALTER TABLE users ADD COLUMN geburtstag TEXT (fehlte!)
- profile.py: Validierung auf \d{2}\.\d{2} (TT.MM Format)
- settings.js: Placeholder/Pattern auf TT.MM geändert
- worlds.js: Birthday-Check auf DD.MM Format angepasst
SW by-v1029, APP_VER 1029
This commit is contained in:
rene 2026-05-16 12:02:52 +02:00
parent a4377033ec
commit b54d9fda99
7 changed files with 16 additions and 10 deletions

View file

@ -1096,8 +1096,8 @@ window.Worlds = (() => {
const dayStr = new Date().toLocaleDateString('de-DE', { weekday:'long', day:'numeric', month:'long' });
// User-Geburtstag heute?
const _todayMmDd = (() => { const d = new Date(); return String(d.getMonth()+1).padStart(2,'0')+'-'+String(d.getDate()).padStart(2,'0'); })();
const userBdayToday = user?.geburtstag && user.geburtstag === _todayMmDd;
const _todayDdMm = (() => { const d = new Date(); return String(d.getDate()).padStart(2,'0')+'.'+String(d.getMonth()+1).padStart(2,'0'); })();
const userBdayToday = user?.geburtstag && user.geburtstag === _todayDdMm;
const greet = userBdayToday
? `Herzlichen Glückwunsch`
: (hour < 5 ? 'Gute Nacht' : hour < 12 ? 'Guten Morgen' : hour < 18 ? 'Hallo' : 'Guten Abend');