"use strict";
Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.formatSeconds = exports.dateToNoYS = exports.currentDateMdhms = exports.currentDateHm = exports.currentLongDate = exports.currentDate = exports.dateToHour = exports.dateToHourMi = exports.dateToMouthDay = exports.dateToStr = exports.strToTime = void 0, Date.prototype.format = function(t) {
  var e, r = {
    "M+": this.getMonth() + 1,
    "d+": this.getDate(),
    "h+": this.getHours(),
    "m+": this.getMinutes(),
    "s+": this.getSeconds(),
    "q+": Math.floor((this.getMonth() + 3) / 3),
    S: this.getMilliseconds()
  };
  for (e in /(y+)/.test(t) && (t = t.replace(RegExp.$1, "".concat(this.getFullYear()).substr(4 - RegExp.$1.length))), r) new RegExp("(".concat(e, ")")).test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? r[e] : "00".concat(r[e]).substr("".concat(r[e]).length)));
  return t
};
var strToTime = function(t) {
  return t = t.replace(/-/g, "/"), new Date(t).getTime()
};
exports.strToTime = strToTime;
var dateToStr = function(t) {
  return new Date(t).format("yyyy-MM-dd hh:mm:ss")
};
exports.dateToStr = dateToStr;
var dateToMouthDay = function(t) {
  return new Date(t).format("MM-dd")
};
exports.dateToMouthDay = dateToMouthDay;
var dateToHourMi = function(t) {
  return new Date(t).format("hh:mm")
};
exports.dateToHourMi = dateToHourMi;
var dateToHour = function(t) {
  t = new Date(t).format("yyyy-MM-dd hh");
  return t = "".concat(t, ":00:00")
};
exports.dateToHour = dateToHour;
var currentDate = function() {
  return (new Date).format("yyyy-MM-dd")
};
exports.currentDate = currentDate;
var currentLongDate = function() {
  return (new Date).format("yyyy-MM-dd hh:mm:ss")
};
exports.currentLongDate = currentLongDate;
var currentDateHm = function() {
  return (new Date).format("hh时mm分")
};
exports.currentDateHm = currentDateHm;
var currentDateMdhms = function() {
  return (new Date).format("MM-dd hh:mm:ss")
};
exports.currentDateMdhms = currentDateMdhms;
var dateToNoYS = function(t) {
  return new Date(t).format("MM-dd hh:mm")
};
exports.dateToNoYS = dateToNoYS;
var formatSeconds = function(t) {
  var e, r;
  return t ? (e = parseInt(t), t = r = 0, t = parseInt(e / 3600), r = parseInt(e % 3600 / 60), "".concat(t, "小时 ").concat(r, "分钟")) : "请开始分析！"
};
exports.formatSeconds = formatSeconds;
