I have a program that displays info based on the day. Everything has been working fine up till today. for some reason when have the calendar roll back one day to get yesterdays date it goes straight to august 30th. it skips august 31st. It will grab todays date fine (septermber 1st) but when i trace it, it goes right past the 31st. anyone suggestions on what I'm doing wrong or a better way to do it? here is my code
Calendar date2;
date2 = Calendar.getInstance();
mday1 = date2.get(Calendar.DATE);
date2.roll(Calendar.DATE, false); //rolls back the date by one day
mday2 = date2.get(Calendar.DATE);