import t from "../node_modules/dayjs/dayjs.min.mjs";
import o from "../node_modules/dayjs/plugin/relativeTime.mjs";
import a from "../node_modules/dayjs/plugin/isBetween.mjs";
import "../node_modules/dayjs/locale/zh-cn.mjs";
t.extend(o);
t.extend(a);
t.locale("zh-cn");
const s = (e, r = "YYYY/MM/DD") => e ? t(e).format(r) : "-", D = (e, r = "YYYY/MM/DD") => e ? t(e).subtract(8, "hour").format(r) : "-", M = (e, r = "YYYY/MM/DD") => e ? t(e).add(8, "hour").format(r) : "-", u = (e, r, m) => {
  let Y;
  return e === "add" ? Y = M(r, "YYYY-MM-DD HH:mm:ss") : e === "subtract" ? Y = D(r, "YYYY-MM-DD HH:mm:ss") : Y = s(r, "YYYY-MM-DD HH:mm:ss"), m ? t(Y).fromNow().replace(" ", "") : t(Y).format("MM-DD HH:mm");
};
export {
  M as addTime,
  s as dayTime,
  t as default,
  u as getLastTimeStr,
  D as subtractTime
};
