mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-03 09:12:30 +00:00
time data management
This commit is contained in:
@@ -30,7 +30,7 @@ export function distancePerHourToSecondsPerDistance(value: number) {
|
||||
export function secondsToHHMMSS(value: number) {
|
||||
var hours = Math.floor(value / 3600);
|
||||
var minutes = Math.floor(value / 60) % 60;
|
||||
var seconds = Math.round(value % 60);
|
||||
var seconds = Math.min(59, Math.round(value % 60));
|
||||
|
||||
return [hours, minutes, seconds]
|
||||
.map((v) => (v < 10 ? '0' + v : v))
|
||||
|
Reference in New Issue
Block a user