mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-08-26 00:29:39 +00:00

* fix: commission device API * task: add create booking API * add get All api for dashboard & mobile * add Find APIs for bookings * implement sending email updates on update bookable space * move email interfaces to separate files
8 lines
254 B
TypeScript
8 lines
254 B
TypeScript
import { format, parse } from 'date-fns';
|
|
|
|
export function to12HourFormat(timeString: string): string {
|
|
timeString = timeString.padEnd(8, ':00');
|
|
const parsedTime = parse(timeString, 'HH:mm:ss', new Date());
|
|
return format(parsedTime, 'hh:mm a');
|
|
}
|