Replace deprecated substr() with slice()

master
Travis Evans 2025-05-07 19:39:53 -05:00
parent bfec737806
commit b7ab9da74a
1 changed files with 2 additions and 2 deletions

View File

@ -187,9 +187,9 @@ function format_duration(msec, have_seconds) {
}
const time = Time_utils.decodeTime(msec);
time.h += time.d * 24;
let str = time.h + ":" + ("0" + time.m).substr(-2);
let str = time.h + ":" + ("0" + time.m).slice(-2);
if (have_seconds) {
str += ":" + ("0" + time.s).substr(-2);
str += ":" + ("0" + time.s).slice(-2);
}
return str;
}