From 63f8e30a7ea0dc014167ceaf232209780b58c6f8 Mon Sep 17 00:00:00 2001 From: yel-m Date: Sun, 26 May 2024 01:16:11 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EC=8B=9C=EA=B0=84=EB=8C=80=20?= =?UTF-8?q?=EA=B8=B0=EC=A4=80=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../happinessql/domain/report/domain/TimePeriod.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/hobak/happinessql/domain/report/domain/TimePeriod.java b/src/main/java/com/hobak/happinessql/domain/report/domain/TimePeriod.java index 6937d05..79d1f98 100644 --- a/src/main/java/com/hobak/happinessql/domain/report/domain/TimePeriod.java +++ b/src/main/java/com/hobak/happinessql/domain/report/domain/TimePeriod.java @@ -6,19 +6,22 @@ @AllArgsConstructor public enum TimePeriod { + DAWN("새벽"), MORNING("아침"), - AFTERNOON("점심"), + AFTERNOON("낮"), EVENING("저녁"), NIGHT("밤"); private final String viewName; public static TimePeriod of(int hour) { - if (hour >= 6 && hour < 12) { + if (hour >= 0 && hour < 5) { + return DAWN; + } else if (hour >= 5 && hour < 9) { return MORNING; - } else if (hour >= 12 && hour < 18) { + } else if (hour >= 9 && hour < 17) { return AFTERNOON; - } else if (hour >= 18 && hour < 24) { + } else if (hour >= 17 && hour < 21) { return EVENING; } else { return NIGHT;