You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
246 B
8 lines
246 B
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;
|