Date issue in Firefox

后端 未结 4 1410
遥遥无期
遥遥无期 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:28

    As explained in the documentation the string you are passing to the constructor of the Date object should be:

    String value representing a date. The string should be in a format recognized by the parse method (IETF-compliant RFC 1123 timestamps).

    Basically it should represent an RFC822 or ISO 8601 date.

提交回复
热议问题