公式

1
2
3
4
5
6
7
天:Math.floor(t/86400)  计算在秒中包含多少天

时:Math.floor(t%86400/3600) 计算在秒中包含多少小时(刨去剩余天数)

分:Math.floor(t%86400%3600/60) 计算在秒中包含多少分 (刨去剩余天数和剩余小时)

秒:Math.floor(t%60) 计算刨去剩余天数、小时、分钟后还剩多少秒
文章目录
|