Add Delete Reservation function
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user