aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt
index 878418e..c113bef 100644
--- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt
+++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt
@@ -1,7 +1,6 @@
package mx.trackermap.TrackerMap.utils
import kotlinx.datetime.*
-import kotlin.math.round
class Formatter {
companion object {
@@ -25,5 +24,9 @@ class Formatter {
}
}
}
+
+ fun formatHours(millis: Long): String {
+ return "${millis / (1000 * 60 * 60)} hr"
+ }
}
} \ No newline at end of file