From 5216c084ac805c49db83b44287dce1f18f241946 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 18 Feb 2023 23:14:31 +0100 Subject: Added support for more formats --- src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt index f7a684630..8002c4768 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt @@ -5,7 +5,7 @@ import java.util.regex.Pattern object TimeUtils { private val pattern = - Pattern.compile("(?:(?\\d+)y(?:\\w* ?)?)?(?:(?\\d+)d(?:\\w* ?)?)?(?:(?\\d+)h(?:\\w* ?)?)?(?:(?\\d+)m(?:\\w* ?)?)?(?:(?\\d+)s(?:\\w* ?)?)?") + Pattern.compile("(?:(?\\d+) ?y(?:\\w* ?)?)?(?:(?\\d+) ?d(?:\\w* ?)?)?(?:(?\\d+) ?h(?:\\w* ?)?)?(?:(?\\d+) ?m(?:\\w* ?)?)?(?:(?\\d+) ?s(?:\\w* ?)?)?") fun formatDuration( millis: Long, -- cgit