Hello,
Currently, when I want to do calculations on dates, I create like you:
Code:
Calendar nwdt = new GregorianCalendar(year.intValue(),
month.intValue(),
day.intValue());
Then, if I want the same date in 15 days, I do:
Code:
nwdt.add(Calendar.DATE, 15);
And then I extract the day, month and year of the new date:
Code:
int Month = nwdt.get(Calendar.MONTH); Month + +;
int Day = nwdt.get(Calendar.DAY_OF_MONTH);
int Year = nwdt.get(Calendar.YEAR);
I suggest this, not knowing exactly and functionally what you're looking to do with your dates.
Bookmarks