Initial commit: ANOUMA website with Payload CMS, WebRTC meetings, and booking system
- Next.js 16 App Router site with the ANOUMA design system - Payload CMS (PostgreSQL) for offers, events, posts and page content - WebRTC video-call system with custom signaling server - SMTP email reminders and booking-request notifications - Customer accounts, calendar-based availability, and booking workflow
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/** Day + short month, e.g. { day: "15", month: "SEP" } — for the date badge on event cards. */
|
||||
export function formatEventDateParts(iso: string) {
|
||||
const date = new Date(iso);
|
||||
return {
|
||||
day: date.toLocaleDateString("de-DE", { day: "2-digit" }),
|
||||
month: date.toLocaleDateString("de-DE", { month: "short" }).toUpperCase().replace(".", ""),
|
||||
};
|
||||
}
|
||||
|
||||
export function formatFullDate(iso: string) {
|
||||
return new Date(iso).toLocaleDateString("de-DE", {
|
||||
weekday: "long",
|
||||
day: "2-digit",
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
});
|
||||
}
|
||||
|
||||
export function formatTime(iso: string) {
|
||||
return new Date(iso).toLocaleTimeString("de-DE", { hour: "2-digit", minute: "2-digit" });
|
||||
}
|
||||
|
||||
export function formatTimeRange(start?: string | null, end?: string | null) {
|
||||
if (start && end) return `${formatTime(start)} – ${formatTime(end)} Uhr`;
|
||||
if (start) return `${formatTime(start)} Uhr`;
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user