🚸 improve countdown accuracy
This commit is contained in:
parent
ab5f77cc7a
commit
5e3d8895e9
@ -31,8 +31,8 @@ async function countdown_redraw(){
|
||||
let hours_raw = Math.floor((difference - (days_raw * 86400000)) / (3600000));
|
||||
let hours = (hours_raw < 10 ? ("0" + hours_raw) : hours_raw);
|
||||
|
||||
// minutes
|
||||
let minutes_raw = Math.floor((difference - (days_raw * 86400000) - (hours_raw * 3600000)) / (60000));
|
||||
// minutes (NOTE: As this is the last unit, we use `ceil` here)
|
||||
let minutes_raw = Math.ceil((difference - (days_raw * 86400000) - (hours_raw * 3600000)) / (60000));
|
||||
let minutes = (minutes_raw < 10 ? ("0" + minutes_raw) : minutes_raw);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user