From f3bf778ebd6c5a468922c98c833eff76c8e254fe Mon Sep 17 00:00:00 2001
From: Luca
Date: Fri, 14 Nov 2025 22:42:21 +0900
Subject: [PATCH] =?UTF-8?q?fix:=20=EB=82=A0=EC=A7=9C=20=ED=8F=AC=EB=A7=B7?=
=?UTF-8?q?=20=EB=B0=8F=20=EC=8B=9C=EA=B0=84=EB=8C=80=20=EC=A1=B0=EA=B1=B4?=
=?UTF-8?q?=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main/kotlin/YukymController.kt | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/main/kotlin/YukymController.kt b/src/main/kotlin/YukymController.kt
index cd4bba7..b092664 100644
--- a/src/main/kotlin/YukymController.kt
+++ b/src/main/kotlin/YukymController.kt
@@ -5,7 +5,7 @@ import java.time.format.DateTimeFormatter
class YukymController {
- val nowDate = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-mm-dd"))
+ val nowDate = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))
lateinit var nowTime: String
@@ -35,17 +35,21 @@ class YukymController {
var result = timeDataOne.first().ty12
val nowTime = LocalDateTime.now()
+ val hour = nowTime.hour
+
when {
- nowTime.hour >= 0 || nowTime.hour < 2 -> return timeDataOne.first().ty1
- nowTime.hour >= 4 || nowTime.hour < 6 -> return timeDataOne.first().ty2
- nowTime.hour >= 6 || nowTime.hour < 8 -> return timeDataOne.first().ty3
- nowTime.hour >= 8 || nowTime.hour < 10 -> return timeDataOne.first().ty4
- nowTime.hour >= 10 || nowTime.hour < 12 -> return timeDataOne.first().ty5
- nowTime.hour >= 12 || nowTime.hour < 14 -> return timeDataOne.first().ty6
- nowTime.hour >= 16 || nowTime.hour < 18 -> return timeDataOne.first().ty7
- nowTime.hour >= 18 || nowTime.hour < 20 -> return timeDataOne.first().ty8
- nowTime.hour >= 20 || nowTime.hour < 22 -> return timeDataOne.first().ty9
- nowTime.hour >= 22 || nowTime.hour < 24 -> return timeDataOne.first().ty10
+ hour >= 0 && hour < 2 -> return timeDataOne.first().ty1
+ hour >= 2 && hour < 4 -> return timeDataOne.first().ty2
+ hour >= 4 && hour < 6 -> return timeDataOne.first().ty3
+ hour >= 6 && hour < 8 -> return timeDataOne.first().ty4
+ hour >= 8 && hour < 10 -> return timeDataOne.first().ty5
+ hour >= 10 && hour < 12 -> return timeDataOne.first().ty6
+ hour >= 12 && hour < 14 -> return timeDataOne.first().ty7
+ hour >= 14 && hour < 16 -> return timeDataOne.first().ty8
+ hour >= 16 && hour < 18 -> return timeDataOne.first().ty9
+ hour >= 18 && hour < 20 -> return timeDataOne.first().ty10
+ hour >= 20 && hour < 22 -> return timeDataOne.first().ty11
+ hour >= 22 && hour < 24 -> return timeDataOne.first().ty12
}
return result