js时间戳转化为便准时间格式

function getdate(time){
              var date = new Date(time);
Y = date.getFullYear() + '-';
M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
D = date.getDate() + ' ';

     tt = Y+M+D;
    
   return tt;

            }

猜你喜欢

转载自blog.csdn.net/weixin_40076986/article/details/78734357