From 9d89e6ae92910da36607b3eeed7328fae58be0ae Mon Sep 17 00:00:00 2001 From: Phoebe <77941535+catgirlseraid@users.noreply.github.com> Date: Sat, 25 May 2024 00:43:28 +1200 Subject: Add 24h time toggle (#1804) Co-authored-by: SeRaid <77941535+SeRaid743@users.noreply.github.com> --- .../at/hannibal2/skyhanni/config/features/gui/GUIConfig.java | 6 ++++++ src/main/java/at/hannibal2/skyhanni/utils/SimpleTimeMark.kt | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java index 5163bc4cd..1309780a8 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/gui/GUIConfig.java @@ -50,6 +50,12 @@ public class GUIConfig { @ConfigEditorSlider(minValue = 0.1F, maxValue = 10, minStep = 0.05F) public float globalScale = 1F; + @Expose + @ConfigOption(name = "Time Format", desc = "Change Skyhanni to use 24h time instead of 12h time.") + @ConfigEditorBoolean + @FeatureToggle + public boolean timeFormat24h = false; + @Expose @ConfigOption(name = "Discord Rich Presence", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SimpleTimeMark.kt b/src/main/java/at/hannibal2/skyhanni/utils/SimpleTimeMark.kt index d818facfe..66286a489 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SimpleTimeMark.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SimpleTimeMark.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.utils +import at.hannibal2.skyhanni.SkyHanniMod import java.time.Instant import java.time.LocalDateTime import java.time.ZoneId @@ -36,9 +37,15 @@ value class SimpleTimeMark(private val millis: Long) : Comparable