TypeError: *.getMonth is not a function 解决办法

在使用之前进行判断就吧问题解决了
if (Object.prototype.toString.call(time) === '[object Date]') {
  time.getMonth()........
}
posted @ 2019-03-19 10:40  水迹仙涯  阅读(4282)  评论(0编辑  收藏  举报