'1分钟之前': [moment().subtract(1, 'm'), moment().subtract(1, 'm')],
 '3分钟之前': [moment().subtract(3, 'm'), moment()],
 '15分钟之前': [moment().subtract(15, 'm'), moment()],
 '1小时之前': [moment().subtract(1, 'h'), moment()],
 '1天': [moment().startOf('day'), moment().endOf('day')],
 '今天': [moment(), moment()],
 '最近3天': [moment().subtract(3, 'days'), moment()],
 '本周': [moment().startOf('week'), moment().endOf('week')],
 '最近7天': [moment().subtract(6, 'days'), moment()],
 '本月': [moment().startOf('month'), moment().endOf('month')],
 '最近30天': [moment().subtract(29, 'days'), moment()],
 '最近3个月': [moment().subtract(3, 'month'), moment()],
 '最近半年': [moment().subtract(6, 'month'), moment()]
 

补充:

  当前至本周末: [ moment(), moment().endOf('weeks') ],
  当前至本月底: [ moment(), moment().endOf('months') ],
  当前至本年底: [ moment(), moment().endOf('year') ],
  本周:[ moment().startOf('weeks'), moment().endOf('weeks') ]

 帮忙点个赞吧~,支持转载请标明出处~

相关文章:

  • 2022-12-23
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2022-01-19
猜你喜欢
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案