"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.combineDateAndTime = exports.getLaterDaysDate = exports.getLaterHoursDate = exports.getNewDate = void 0;
const date_fns_1 = require("date-fns");
function getNewDate(date) {
    if (date) {
        return new Date(date);
    }
    return new Date();
}
exports.getNewDate = getNewDate;
function getLaterHoursDate(h) {
    return (0, date_fns_1.addHours)(getNewDate(), h);
}
exports.getLaterHoursDate = getLaterHoursDate;
function getLaterDaysDate(d) {
    return (0, date_fns_1.addDays)(getNewDate(), d);
}
exports.getLaterDaysDate = getLaterDaysDate;
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();
};
exports.combineDateAndTime = combineDateAndTime;
