function times(num){ let now=new Date(num) let n=now.getFullYear() let y=now.getMonth()+1>=10?now.getMonth()+1:0+''+(now.getMonth()+1); var r =now.getDate()>=10?now.getDate():0+''+now.getDate(); return n+'-'+y+'-'+r } module.exports = times;