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

在使用之前进行判断就吧问题解决了
if (Object.prototype.toString.call(time) === '[object Date]') {
  time.getMonth()........
}
原文地址:https://www.cnblogs.com/jiaxiaonuo/p/10557054.html