随笔分类 - js日期
摘要:计算两个给定日期之间的天数 const days = (date, otherDate) => Math.ceil(Math.abs(date - otherDate) / (86400000)); result = days(new Date('2020-04-15'), new Date('20
阅读全文
摘要:function getDateTime() { var date = new Date(), year = date.getFullYear(), month = date.getMonth() + 1, day = date.getDate(), hour = date.getHours() +
阅读全文