export const MINUTE = 60;
export const HOUR = MINUTE * 60;
export const DAY = HOUR * 24;
export const MONTH = DAY * 30;
export const guessResolutionAndValue = (after) => {
    let resolution;
    let value;
    if (after >= MONTH) {
        resolution = "month";
        value = Math.round(after / MONTH);
    }
    else if (after >= DAY) {
        resolution = "day";
        value = Math.round(after / DAY);
    }
    else if (after >= HOUR) {
        resolution = "hour";
        value = Math.round(after / HOUR);
    }
    else {
        resolution = "minute";
        value = Math.round(after / MINUTE);
    }
    return {
        resolution,
        value,
    };
};
//# sourceMappingURL=utils.js.map