ob1kanobee
Programmer
I have my Calendar date set for Wednesday, February 1, 2006.
I am trying to get the int value for the day of week for that date, which I assume should return 3 for a Wednesday.
Calendar myCal = Calendar.getInstance();
firstCal.set(Calendar.MONTH,2);
firstCal.set(Calendar.DAY_OF_MONTH,1);
firstCal.set(Calendar.YEAR,2006);
int firstDayOfWeek = firstCal.DAY_OF_WEEK;
It returns a 7. What am I doing wrong?
I am trying to get the int value for the day of week for that date, which I assume should return 3 for a Wednesday.
Calendar myCal = Calendar.getInstance();
firstCal.set(Calendar.MONTH,2);
firstCal.set(Calendar.DAY_OF_MONTH,1);
firstCal.set(Calendar.YEAR,2006);
int firstDayOfWeek = firstCal.DAY_OF_WEEK;
It returns a 7. What am I doing wrong?