day of the week
by rajesh[ Edit ] 2009-12-30 16:01:01
The day of the week for today :
GregorianCalendar cal = new GregorianCalendar();
int dayOfTheWeek = cal.get(Calendar.DAY_OF_WEEK);
The day of the week for any date :
GregorianCalendar  cal = new GregorianCalendar();
cal.set(1980, 9, 7, 0, 0, 0);
int day = newCal.get(Calendar.DAY_OF_WEEK);
//similarly we cal also use the following
// Calendar.DAY_OF_MONTH
// Calendar.DAY_OF_WEEK_IN_MONTH
// Calendar.DAY_OF_YEAR
// Calendar.DATE