Add Delete Reservation function

This commit is contained in:
2024-05-26 07:13:20 -04:00
parent 59d2729719
commit 6654132120
4 changed files with 223 additions and 169 deletions

View File

@@ -71,6 +71,14 @@ export function buildInterval(
return result;
}
export const isPast = (itemDate: Date | string): boolean => {
if (!(itemDate instanceof Date)) {
itemDate = new Date(itemDate);
}
const currentDate = new Date();
return itemDate < currentDate;
};
export function formatDate(inputDate: string | undefined): string {
if (!inputDate) return '';
return date.formatDate(new Date(inputDate), 'ddd MMM Do hh:mm A');