【发布时间】:2013-09-12 20:34:02
【问题描述】:
使用时
test = new Date(),
在做console.log ('test')我明白了
"Thu Sep 12 2013 17:55:25 GMT+0545 (NPT)"。我只需要"Thu Sep 12 2013"。
在做这些(new Date()).getDay() 它对我不起作用。
帮帮我,伙计们。
提前谢谢你!!!
【问题讨论】:
标签: coffeescript meteor
使用时
test = new Date(),
在做console.log ('test')我明白了
"Thu Sep 12 2013 17:55:25 GMT+0545 (NPT)"。我只需要"Thu Sep 12 2013"。
在做这些(new Date()).getDay() 它对我不起作用。
帮帮我,伙计们。
提前谢谢你!!!
【问题讨论】:
标签: coffeescript meteor
怎么样:
test = new Date()
console.log(test.toDateString())
来自:http://devdocs.io/javascript/global_objects/date/todatestring
【讨论】: