i'm finally getting serious about client side code. using jquery as my framework.
I have an ajax request returning json. all is great, except dates are strings (example [\/Date(1198904400000-0500)\/]), not dates. googling shows this is expected. what I haven't found is a way to parse the json string-date to a real date object.
how do I do this? surprisingly the jquery forum has not responded to my question? maybe because this isn't directly a jquery issue. ideally I would like to do this
Jason Meckley
Programmer
Specialty Bakers, Inc.
I have an ajax request returning json. all is great, except dates are strings (example [\/Date(1198904400000-0500)\/]), not dates. googling shows this is expected. what I haven't found is a way to parse the json string-date to a real date object.
how do I do this? surprisingly the jquery forum has not responded to my question? maybe because this isn't directly a jquery issue. ideally I would like to do this
Code:
var result = get_json_result();
var a_real_date_object = result.a_date.[COLOR=blue]to_date()[/color];
alert(a_real_date_object);
Jason Meckley
Programmer
Specialty Bakers, Inc.