Date.parseWeird = Date.prototype.parseWeird = function (d) {
return new Date(parseInt(d.replace(/[^\-\d]/g, ""), 10));
};
var newDate = Date.parseWeird("\/Date(1317847200000-0400)\/");
document.write(newDate);
这将返回我提取时间Thu Oct 06 2011 02:10:00 GMT+0530 (India Standard Time)
之日起输入反应
我想提取这个02:10:00
,并转换到这个时候像这样9:30 P.M or A.M
哪里日期从何而来?它看起来像来自服务器上.NET webmethod的默认日期,我是对的吗?你可以解决问题的服务器端然后(看看JSON序列化) –
@Baszz:我没有访问服务器端...我必须在客户端.. –