dayjs获取当前时间前后三个月

838 阅读1分钟

前三个月

dayjs().subtract(3, "months").format("YYYY-MM-DD")

后三个月

dayjs().subtract(-3, "months").format("YYYY-MM-DD")