mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-12-03 10:04:29 +00:00
time data management
This commit is contained in:
1 parent
4225db3c04
commit
5f9d609a04
10 files changed
+287
-52
No files matched your search
@@ -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