import dayjs from "dayjs";

/**
 * In: 14:30
 * Out: 2:30 PM
 */
export const renderHoursAndMinutes = (time: string): string => {
    // use dayjs
    return dayjs(time, 'HH:mm').format('h:mm A');
}

/**
 * In: [00:00, 23:59]
 * Out: true
 *
 * In: [14:30, 16:00]
 * Out: false
 */
export const isAllDay = (time: [string, string]): boolean => {
    return time[0] === '00:00' && time[1] === '23:59'
}