Java2020. 11. 14. 17:57
728x90
반응형
SMALL

 

 

/*
* 현재의 요일 구한다.
* 예) int day = DateUtil.getDayOfWeek();
*/
public static int getDayOfWeek() {
Calendar rightNow = Calendar.getInstance();
int day_of_week = rightNow.get(Calendar.DAY_OF_WEEK);
return day_of_week;
//SUNDAY = 1
//MONDAY    = 2
//TUESDAY   = 3
//WEDNESDAY = 4
//THURSDAY  = 5
//FRIDAY    = 6
}

 

 

 

 

728x90
반응형
LIST
Posted by 사슴영혼'-'