chore(format): Prettier auf werktag.ts anwenden
Alt-Bestand nie formatiert — isolierter Format-Lauf vor isEditableWithinGrace. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
6acf9977ec
commit
ccd5c42709
1 file changed
+8
-1
@@ -74,7 +74,14 @@ export function berlinDayStartMs(iso: string): number {
|
|||||||
second: '2-digit',
|
second: '2-digit',
|
||||||
}).formatToParts(new Date(utcMidnight));
|
}).formatToParts(new Date(utcMidnight));
|
||||||
const get = (t: string) => Number(parts.find((p) => p.type === t)?.value ?? '0');
|
const get = (t: string) => Number(parts.find((p) => p.type === t)?.value ?? '0');
|
||||||
const asIfUtc = Date.UTC(get('year'), get('month') - 1, get('day'), get('hour'), get('minute'), get('second'));
|
const asIfUtc = Date.UTC(
|
||||||
|
get('year'),
|
||||||
|
get('month') - 1,
|
||||||
|
get('day'),
|
||||||
|
get('hour'),
|
||||||
|
get('minute'),
|
||||||
|
get('second'),
|
||||||
|
);
|
||||||
const offset = asIfUtc - utcMidnight; // ms, die Berlin der UTC voraus ist
|
const offset = asIfUtc - utcMidnight; // ms, die Berlin der UTC voraus ist
|
||||||
return utcMidnight - offset;
|
return utcMidnight - offset;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user