在做日期方面的需求时,需要考虑到大小月的问题  ##格式:new Date(year,month,0).getDate()

new Date(2019,12,0).getDate()

可以在控制台打印看看

相关文章: