From 5ab6ab80a61a56f146adf5116ea7b4bd1ef842fa Mon Sep 17 00:00:00 2001 From: Jieun Lee Date: Fri, 14 Nov 2025 17:54:56 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[=EA=B3=BC=EC=A0=9C]=20chore:=20build.gradl?= =?UTF-8?q?e=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- build.gradle.kts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b1dff0d..16ba9fd 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,5 @@ bin/ .vscode/ ### Mac OS ### -.DS_Store \ No newline at end of file +.DS_Store +.idea \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 7dbaad0..a143c3c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - kotlin("jvm") version "2.0.21" + kotlin("jvm") version "2.2.0" } group = "com.survivalcoding" @@ -17,5 +17,5 @@ tasks.test { useJUnitPlatform() } kotlin { - jvmToolchain(17) + jvmToolchain(21) } \ No newline at end of file From 2a01e6b7b727259d4fb5f385e29e55ddb676ba67 Mon Sep 17 00:00:00 2001 From: Jieun Lee Date: Fri, 14 Nov 2025 18:10:44 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[=EA=B3=BC=EC=A0=9C]=20fix:=20=EC=97=B0?= =?UTF-8?q?=EC=8A=B5=EB=AC=B8=EC=A0=9C=202=20=ED=92=80=EC=9D=B4=20?= =?UTF-8?q?=EC=A0=9C=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/YukymController.kt | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/kotlin/YukymController.kt b/src/main/kotlin/YukymController.kt index cd4bba7..e22d89a 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 @@ -36,16 +36,17 @@ class YukymController { val nowTime = LocalDateTime.now() 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 + // 조건문 오류 수정 + 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 } return result