你能解释一下这个java日历代码吗
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.MONTH, month-1);
为什么我们将月份的值递减一
calendar.set(Calendar.DAY_OF_MONTH, day);
calendar.set(Calendar.YEAR, year);
return calendar.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, Locale.US).toUpperCase();