function getDates (start,end){
}
getDates("2020-04-27", "2020-06-19")
// 返回['2020年4月27日一2020年4月30日','2020年5月1日一2020年5月31日','2020年6月1日一2020年6月19日']
function getDates (start,end){
}
getDates("2020-04-27", "2020-06-19")
// 返回['2020年4月27日一2020年4月30日','2020年5月1日一2020年5月31日','2020年6月1日一2020年6月19日']
date = new Date("2020-04-27")
console.log(date.toLocaleDateString())
date.setMonth(date.getMonth() + 1)
console.log(date.toLocaleDateString())
date.setDate(0)
console.log(date.toLocaleDateString())
懂了吗?
13 回答12.8k 阅读
8 回答2.6k 阅读
2 回答5.1k 阅读✓ 已解决
7 回答1.9k 阅读
3 回答2.2k 阅读✓ 已解决
5 回答851 阅读
3 回答1.1k 阅读✓ 已解决