我对新日期()有一些错误;我使用 node js 和插件 express npm 我构建变量日期但是有问题编译是错误的
这是我的代码.js
var update_time = new Date();
update_time.formatDate("y/m/d");
我运行节点这是错误
/home/kingdark/Repos/api/epg/node_modules/xml2js/lib/xml2js.js:216
throw ex;
^
TypeError: Object Fri Feb 08 2013 14:33:09 GMT+0700 (ICT) has no method 'formatDate'
at /home/kingdark/Repos/api/epg/src/sync/epg.js:24:22
at Parser.exports.Parser.Parser.parseString (/home/kingdark/Repos/api/epg/node_modules/xml2js/lib/xml2js.js:199:18)
at Parser.EventEmitter.emit (events.js:96:17)
at Object.exports.Parser.Parser.reset.saxParser.onclosetag (/home/kingdark/Repos/api/epg/node_modules/xml2js/lib/xml2js.js:183:24)
at emit (/home/kingdark/Repos/api/epg/node_modules/xml2js/node_modules/sax/lib/sax.js:589:33)
at emitNode (/home/kingdark/Repos/api/epg/node_modules/xml2js/node_modules/sax/lib/sax.js:594:3)
at closeTag (/home/kingdark/Repos/api/epg/node_modules/xml2js/node_modules/sax/lib/sax.js:834:5)
at Object.write (/home/kingdark/Repos/api/epg/node_modules/xml2js/node_modules/sax/lib/sax.js:1253:29)
at Parser.exports.Parser.Parser.parseString (/home/kingdark/Repos/api/epg/node_modules/xml2js/lib/xml2js.js:211:31)
at Parser.__bind [as parseString] (/home/kingdark/Repos/api/epg/node_modules/xml2js/lib/xml2js.js:6:61)
at /home/kingdark/Repos/api/epg/src/sync/epg.js:16:15
如何解决可能我的语法错误,对不起我的英语技能。