JS new date在IOS出现的问题

实例代码:

   input = input.replace(/-/g, "/");//横杠的时间不能被识别,所以要替换程斜杠
      let time = new Date(input);
      let year = time.getFullYear(); //
      let month = time.getMonth() + 1; //
      let day = time.getDate(); //
      return `${year}年${month}月${day}日`;

参考:

https://www.cnblogs.com/frogblog/p/9040775.html

原文地址:https://www.cnblogs.com/llcdbk/p/12083579.html