Calendar calendar = Calendar.getInstance();
int day = calendar.get(Calendar.DAY_OF_WEEK);
String vamp = "";
switch (day) {
	case Calendar.SUNDAY:
		vamp = "일";
		break;
	case Calendar.MONDAY:
		vamp = "월";
		break;
	case Calendar.TUESDAY:
		vamp = "화";
		break;
	case Calendar.WEDNESDAY:
		vamp = "수";
		break;
	case Calendar.THURSDAY:
		vamp = "목";
		break;
	case Calendar.FRIDAY:
		vamp = "금";
		break;
	case Calendar.SATURDAY:
	    vamp = "토";
		break;
}

※ Calendar.SUNDAY == 1


저작자 표시 비영리 변경 금지
신고

티스토리 툴바