php - Parsing datepicker date in javascript "dd monthstring, yyyy" -
Is there an easy way to get date time from the string such as: "March 29, 2014" in JAVASCRIPT I have done this in PHP, but I want to brace with some end of the line so that day can be added. To obtain the required PHP code here: is calling it to get the required date time: Can anyone solve this problem? Getting the same result, but in javascript? Edit: It has already been implemented in PHP. I need to do this at the front end, i.e. no form is stored, anywhere Can not send anything, I have to get this date from any input field, i.e. Thanks! try it Object:
Remove the function data com ($ string) {$ non-comma = preg_replace ('/, /', '' , $ String); Without $ Comma Return; } GetyearMonthDayFromDate ($ string) function {$ array = array (); $ String = removeDateComma ($ string); $ String = strontium ($ string); $ Year = date ('y', $ string); $ Month = date ('m', strotomom ("- 1 month", $ string)); $ Day = date ('D', $ string); $ Array ['year'] = $ year; $ Array ['month'] = $ month; $ Array ['day'] = $ day; Return $ array; }
$ from $ getyearMonthDayFromDate ($ _ [request ['from_data']);
var field = document.getElementById ("input_from"). ; so that this format will be in 11 months, 2014 . Therefore, I get this string which is useless here, which is useless, I want every individual value, i.e. year: 2014 , month: 03 or 3 and day: 11 < / Strong>
Comments
Post a Comment