import { addDays, addHours } from 'date-fns';
export function getNewDate(date) {
    if (date) {
        return new Date(date);
    }
    return new Date();
}
export function getLaterHoursDate(h) {
    return addHours(getNewDate(), h);
}
export function getLaterDaysDate(d) {
    return addDays(getNewDate(), d);
}
export const combineDateAndTime = (date, time) => {
    const combined = date;
    combined.setHours(time.getHours());
    combined.setMinutes(time.getMinutes());
    combined.setSeconds(time.getSeconds());
    combined.setMilliseconds(time.getMilliseconds());
    return combined.toISOString();
};
