i am using the calendar class to display the date on my
JSP; i am rolling my day back by one day by using the command
if (true){
cal.roll(Calendar.DATE, false);
}
now, it is rolling only the date but not the month and this is creating descrepencies;
Condition 1: when the date is not the first day of the month, this method works perfect;
Condition 2: when the date is the first day of the month, it rolls the day back only the date by one day but does not change the month; for example: when it is May 1,2001 it shows rolled back date as May 31, 2001 instead of April 30,2001;
any help will be appreciated.