why Date value is changing
Posted on 2006-06-08
I want to set my java.util.Date date variable with 31.12.9999.
but I saw in the documentation that the year could not be more than 8901 or so (I don't know exactly.) Then I thought to set my date with 31.12.9000 and did the following.
Calendar c = Calendar.getInstance();
java.util.Date date = c.getTime(); <------ but in this line if I watch, it is showing the date as --> "Sat Jan 31 00:00:00 CET 9001"
The date is changed to one month after than what I gave. why it happend ?
and I need the axact format 31.12.9999 in my date (java.util.Date ) variable.