摘要: getSixMonths(new Date(), 4) // date日期对象,num几个月 function getSixMonths(date, num) { let year = date.getFullYear() let month = date.getMonth() + 1 this.t 阅读全文
posted @ 2021-08-11 14:58 甜土豆 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 效果图 直接放代码 class DateUtil { constructor() { this.now = new Date(); // 当前日期 this.nowDayOfWeek = this.now.getDay(); // 今天本周的第几天 this.nowDay = this.now.ge 阅读全文
posted @ 2021-08-11 14:35 甜土豆 阅读(58) 评论(0) 推荐(0) 编辑