"use strict";

Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.getMonthTimeByStr = exports.getWeekTimeByStr = exports.getDayTimeByStr = exports.getBeforeByStr = void 0;

var _DateUtil = require("./DateUtil"), getBeforeByStr = function(e, t) {
  var r = new Date((0, _DateUtil.strToTime)((0, _DateUtil.dateToHour)((0, _DateUtil.strToTime)(e) + 36e5)));
  return [ r.getTime() - 60 * (t + 1) * 60 * 1e3, r.getTime() ];
};

exports.getBeforeByStr = getBeforeByStr;

var getDayTimeByStr = function(e) {
  var t = new Date((0, _DateUtil.strToTime)(e)), r = new Date(t.toLocaleDateString()).getTime();
  return [ r, r + 864e5 ];
};

exports.getDayTimeByStr = getDayTimeByStr;

var getWeekTimeByStr = function(e) {
  var t = new Date((0, _DateUtil.strToTime)(e)), r = new Date(t.toLocaleDateString()).getTime();
  return [ r -= 2592e5, r + 6048e5 ];
};

exports.getWeekTimeByStr = getWeekTimeByStr;

var getMonthTimeByStr = function(e) {
  var t = new Date((0, _DateUtil.strToTime)(e)), r = new Date(t.toLocaleDateString()).getTime();
  return [ r -= 18144e5, r + 2592e6 ];
};

exports.getMonthTimeByStr = getMonthTimeByStr;