diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-16 18:21:12 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-16 18:21:12 -0600 |
commit | c7b28c25b032a1b82b782ef5ff8dd5e703d5a8ad (patch) | |
tree | 4095a6c4c64442277081e58fff72829ac01c7d11 /shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils | |
parent | f47c9f6b62dd1949cd2f926348a7e057c3ae221c (diff) | |
parent | 21e16e27f047053582d8b0c722feedf3c8badebe (diff) | |
download | etbsa-trackermap-mobile-c7b28c25b032a1b82b782ef5ff8dd5e703d5a8ad.tar.gz etbsa-trackermap-mobile-c7b28c25b032a1b82b782ef5ff8dd5e703d5a8ad.tar.bz2 etbsa-trackermap-mobile-c7b28c25b032a1b82b782ef5ff8dd5e703d5a8ad.zip |
Merge branch 'main' of https://git.sr.ht/~avalos/trackermap-mobile
Diffstat (limited to 'shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt | 5 | ||||
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt | 1 |
2 files changed, 5 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 diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt index 118c117..b1a6444 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt @@ -31,6 +31,7 @@ class MapCalculus { 19 -> 1066.36479193 20 -> 533.182395965 21 -> 266.5911979825 + 22 -> 133.29559899125 else -> null } } |