intervalTime.js 306 字节
//计算两个时间之间的时间差 多少天时分秒
export function intervalTime(timestamp1, timestamp2) {
  // 将时间戳转换为毫秒
  const diffInMilliseconds = Math.abs(timestamp2 - timestamp1);
  // 1 小时等于 3600000 毫秒
  return (diffInMilliseconds / 3600000).toFixed(2) + '时';
}