"use strict";
const common_vendor = require("../vendor.js");
common_vendor.dayjs.locale("zh-cn");
common_vendor.dayjs.extend(common_vendor.relativeTime);
function getDay(num) {
  if (num) {
    const yesterday = common_vendor.dayjs().subtract(num, "day");
    console.log(yesterday.format("YYYY-MM-DD"));
    return yesterday.format("YYYY-MM-DD");
  }
  return common_vendor.dayjs().format("YYYY-MM-DD");
}
exports.getDay = getDay;
