Phase 3: Appointment model & booking API with timezone fix

This commit is contained in:
counterweight 2025-12-21 00:03:34 +01:00
parent f6cf093cb1
commit 06817875f7
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
9 changed files with 946 additions and 9 deletions

View file

@ -15,9 +15,12 @@ type AvailabilityDay = components["schemas"]["AvailabilityDay"];
type AvailabilityResponse = components["schemas"]["AvailabilityResponse"];
type TimeSlot = components["schemas"]["TimeSlot"];
// Helper to format date as YYYY-MM-DD
// Helper to format date as YYYY-MM-DD in local timezone
function formatDate(d: Date): string {
return d.toISOString().split("T")[0];
const year = d.getFullYear();
const month = String(d.getMonth() + 1).padStart(2, "0");
const day = String(d.getDate()).padStart(2, "0");
return `${year}-${month}-${day}`;
}
// Helper to get next N days starting from tomorrow