在 aws 中的 lambda 上使用 node.js 为什么
const todaysDate = Date.now();
将今天的日期返回为“1513319707926”
我知道格式是错误的,但 iv 尝试了 consttodaysDate = Date.now().format('MM/DD/YYYY');
并且没有触发
我想要的只是今天的日期等于例如 15/12/2017
尝试,
const todaysDate =new Date();
console.log((todaysDate.getMonth()+1)+'/'+todaysDate.getDate()+'/'+todaysDate.getFullYear());
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句