export default { getNow(fmt){ let now=new Date(); let y=now.getFullYear(),m=now.getMonth()+1,d=now.getDate(),h=now.getHours(),mi=now.getMinutes(),s=now.getSeconds(); m=m>9?m.toString():('0'+m); d=d>9?d.toString():('0'+d); h=h>9?h.toString():('0'+h); mi=mi>9?mi.toString():('0'+mi); s=s>9?s.toString():('0'+s); if(fmt=='mm月dd日'){ return `${m}月${d}日`; } return `${y}-${m}-${d} ${h}:${mi}:${s}`; } }