Date issue in Firefox

后端 未结 4 1318
遥遥无期
遥遥无期 2021-01-06 09:06

I want to parse date in my page to Javascript\'s Date.

So I have this in my page

01-07-2012 01:04 PM

4条回答
  •  时光说笑
    2021-01-06 09:24

    If you really want full cross-browser support for any date format, you should take a look at moment.js. It allows you to be explicit about the input format. For example:

    var m = moment('01-07-2012 01:04 PM', 'DD-MM-YYYY  hh:mm a');
    

提交回复
热议问题