"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dhmDiffDate = exports.diffDate = exports.dhm = void 0;
function dhm(ms) {
    const days = Math.floor(ms / (24 * 60 * 60 * 1000));
    const daysMs = ms % (24 * 60 * 60 * 1000);
    const hours = Math.floor(daysMs / (60 * 60 * 1000));
    const hoursMs = ms % (60 * 60 * 1000);
    const minutes = Math.floor(hoursMs / (60 * 1000));
    const minutesMs = ms % (60 * 1000);
    const sec = Math.floor(minutesMs / 1000);
    const secMs = ms % 1000;
    return days + ':' + hours + ':' + minutes + ':' + sec + ':' + secMs;
}
exports.dhm = dhm;
function diffDate(from, to) {
    return to.getTime() - from.getTime();
}
exports.diffDate = diffDate;
function dhmDiffDate(from, to) {
    return dhm(diffDate(from, to));
}
exports.dhmDiffDate = dhmDiffDate;
//# sourceMappingURL=times.js.map