Simplest way to parse a Date in Javascript

后端 未结 4 1700
小蘑菇
小蘑菇 2020-12-06 19:10

I want to parse a Date chosen by user:

var ds = \"11 / 08 / 2009\";

I use

var d = new Date(ds);

It gives

4条回答
  •  萌比男神i
    2020-12-06 19:57

    Extend date to return values in your desired format.

    Here is a great article on how to do so. It includes code snippets.

提交回复
热议问题