我正在尝试通过以下方式创建 javascript 日期对象
var object = {"name":"Bay Area Global Health Film Festival","start_time":"2013-07-08T19:00:00","end_time":"2013-07-08T23:45:00","timezone":"America/Los_Angeles","location":"San Francisco","id":"458415670892007","rsvp_status":"attending"}
var tempDate = date(object.start_time);
我得到了错误:
date is not defined
我还尝试使用以下方法修剪字符串:
var tempDate = date(object.start_time.slice(0,object.start_time.indexOf("T"));
//This yields an input of 2013-07-08
哪个抛出相同的错误