date() function returning Invalid Date in Safari and Firefox

前端 未结 5 1376
清酒与你
清酒与你 2021-02-14 03:57

I am formatting a date in the following way:

date = new Date(\"2013-05-12 20:00:00\");
formattedDate = new Date(date.getFullYear(),date.getMonth(),date.getDate()         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-14 04:47

    Why not hijack Date with fix-date at the beginning of your code?

    import 'fix-date' // that's ok!
    

提交回复
热议问题