"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.calcToDate = void 0;
var _locale = require("@mirai/locale");
const calcToDate = function () {
  let dates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  let rangeMaxDays = arguments.length > 1 ? arguments[1] : undefined;
  return dates.length > 0 ? (0, _locale.dateFormat)((0, _locale.dateCalc)((0, _locale.parseDate)([...dates].pop()), rangeMaxDays, 'days')) : undefined;
};
exports.calcToDate = calcToDate;
//# sourceMappingURL=calcToDate.js.map