aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt
index 6aa418f85..67463db18 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt
@@ -15,14 +15,6 @@ object TimeUtils {
private val pattern =
"(?:(?<y>\\d+) ?y(?:\\w* ?)?)?(?:(?<d>\\d+) ?d(?:\\w* ?)?)?(?:(?<h>\\d+) ?h(?:\\w* ?)?)?(?:(?<m>\\d+) ?m(?:\\w* ?)?)?(?:(?<s>\\d+) ?s(?:\\w* ?)?)?".toPattern()
- fun formatDuration(
- duration: Duration,
- biggestUnit: TimeUnit = TimeUnit.YEAR,
- showMilliSeconds: Boolean = false,
- longName: Boolean = false,
- maxUnits: Int = -1
- ): String = duration.format(biggestUnit, showMilliSeconds, longName, maxUnits)
-
fun Duration.format(
biggestUnit: TimeUnit = TimeUnit.YEAR,
showMilliSeconds: Boolean = false,