M
Manoj Nair
I have my Gregorian Cal set to 28-FEB-2002. I basically want to
subtract a month from this date to get 31-Jan-2002. I do the
following..
GC.add(Calendar.MONTH,(-1)*Integer.parseInt(Long.toString(1) ).
This prints out 28-jan-2002 instead of 31-jan-2002. Similary if
original date was 30-APR-2002 and i subtract 1 month I get 30-MAR-2002
instead of 31-MAR-2002.
It seems like when you subtract months from a calender date it always
takes away 30 days from date passed ???
subtract a month from this date to get 31-Jan-2002. I do the
following..
GC.add(Calendar.MONTH,(-1)*Integer.parseInt(Long.toString(1) ).
This prints out 28-jan-2002 instead of 31-jan-2002. Similary if
original date was 30-APR-2002 and i subtract 1 month I get 30-MAR-2002
instead of 31-MAR-2002.
It seems like when you subtract months from a calender date it always
takes away 30 days from date passed ???