M39: harden application and acceptance gates
This commit is contained in:
@@ -44,3 +44,15 @@ export function brusselsLocalToIso(value: string): string {
|
||||
}
|
||||
return new Date(candidate).toISOString();
|
||||
}
|
||||
|
||||
/** Start of the given Brussels calendar day (YYYY-MM-DD) as a UTC ISO instant. */
|
||||
export function brusselsDayStartIso(day: string): string {
|
||||
return brusselsLocalToIso(`${day}T00:00`);
|
||||
}
|
||||
|
||||
/** Start of the day *after* the given Brussels calendar day, i.e. an exclusive upper bound. */
|
||||
export function brusselsNextDayStartIso(day: string): string {
|
||||
const [year, month, date] = day.split("-").map(Number);
|
||||
const next = new Date(Date.UTC(year, month - 1, date + 1));
|
||||
return brusselsLocalToIso(`${next.toISOString().slice(0, 10)}T00:00`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user