Skip to content

Commit df01d1d

Browse files
김산김산
authored andcommitted
Fix(SoonMenu): 시간 경계일때 잘못 나오는 에러
1 parent 1bbce2f commit df01d1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/example/helper/service/ChatbotService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ public String resultMenu(Meal meal0, Meal meal1, Meal meal2){
101101
String result = today.get(Calendar.YEAR)+"-"+(today.get(Calendar.MONTH)+1)+ "-"+ today.get(Calendar.DATE);
102102

103103

104-
if(today.get(Calendar.HOUR_OF_DAY)>19 || today.get(Calendar.HOUR_OF_DAY)<9){result += " 조식\n";}
105-
else if(today.get(Calendar.HOUR_OF_DAY)>9 && today.get(Calendar.HOUR_OF_DAY)<13) {result += " 중식\n";}
106-
else if(today.get(Calendar.HOUR_OF_DAY)>13 && today.get(Calendar.HOUR_OF_DAY)<19) {result += " 석식\n";}
104+
if(today.get(Calendar.HOUR_OF_DAY)>=19 || today.get(Calendar.HOUR_OF_DAY)<9){result += " 조식\n";}
105+
else if(today.get(Calendar.HOUR_OF_DAY)>=9 && today.get(Calendar.HOUR_OF_DAY)<13) {result += " 중식\n";}
106+
else if(today.get(Calendar.HOUR_OF_DAY)>=13 && today.get(Calendar.HOUR_OF_DAY)<19) {result += " 석식\n";}
107107

108108
if(today.get(Calendar.DAY_OF_WEEK) == 6 && today.get(Calendar.HOUR_OF_DAY)>19){
109109
result += meal2.generateMenu(); //금요일 저녁엔 토요일(주말) 아침을 보여줘야함

0 commit comments

Comments
 (0)