This question already has an answer here:
- Converting a string to a date in JavaScript 30 answers
Having this string 30/11/2011
. I want to convert it to date object.
Do I need to use :
Date d = new Date(2011,11,30); /* months 1..12? */
or
Date d = new Date(2011,10,30); /* months 0..11? */
?
First extract the string like this
Then,
as months are indexed from 0 in js.