I am trying to convert the http request data to the correct date format I need.
My http request data from an company returns data like
2015-03-11, 2015-05-13, 2015-11-21...etc.
My codes.
var day1 = '2015-03-11'; //return from http request
var day2 = '2015-05-13'; //return from http request
var date = new Date(day1) ->
//time will be off 1 day for some reason
//because javascript can't recognize 03 and it is a string.`
I need to be able to convert 2015-03-11
to March, 11, 2015
. Is there any correct ways to fix this issue?
Thanks so much!