const d = Math.floor(timestamps / 86400000); // 天
const h = Math.floor(timestamps % 86400000 / 3600000); // 时
const m = Math.floor(timestamps % 86400000 % 3600000 / 60000); // 分
const s = Math.floor(timestamps % 86400000 % 3600000 % 60000 / 1000); // 秒
毫秒时间戳转换成对应天、时、分、秒
最新推荐文章于 2023-09-20 15:12:19 发布
这段代码将时间戳转换为天、小时、分钟和秒的格式,适用于日志或时间记录分析。
3277

被折叠的 条评论
为什么被折叠?



