var timeTranslate = {
  //时间戳转换
timestampToTime: function (timestamp) {
  //注意timestamp需为number
  var _num = parseInt(timestamp)
  if(!_num){
    return ''
  }
  var _timestamp =  _num>1000000000000?_num:(_num*1000);
  var date = getDate(_timestamp);//时间戳为10位需*1000
  var Y = date.getFullYear() + '/';
  var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/';
  var D = date.getDate() + ' ';
  var h = (date.getHours()< 10 ? '0' +date.getHours():date.getHours() )+ ':';
  var m = (date.getMinutes()< 10 ? '0' +date.getMinutes():date.getMinutes() )+ ':';
  var s = (date.getSeconds()< 10 ? '0' +date.getSeconds():date.getSeconds() );
  return Y + M + D + h + m + s;
},
 //时间戳相差
 timestampToDIF: function (timestamp) {
  var date = getDate(timestamp * 1000);//时间戳为10位需*1000
  var nowdate = getDate();
  return date>nowdate?date-nowdate:nowdate-date;
}
}
module.exports = {
timestampToTime: timeTranslate.timestampToTime,
timestampToDIF:timeTranslate.timestampToDIF
}