M
Marco Carnazzo
Hi there.
I have this piece of code:
-------
GregorianCalendar date = new GregorianCalendar(23432, 2343244, 9433);
int day = date.get(Calendar.DATE);
int month = date.get(Calendar.MONTH);
int year = date.get(Calendar.YEAR);
System.out.println("Date: " + month + " - " + day + " - " + year);
System.out.println("Time: " + date.getTime());
-------
And the output is:
-------
Date: 1 - 26 - 218728
Time: Sun Feb 26 00:00:00 CET 218728
-------
Strange, uh?
Why isn't there an exception?
How can I validate the GregorianCalendar variable?
Thanks.
I have this piece of code:
-------
GregorianCalendar date = new GregorianCalendar(23432, 2343244, 9433);
int day = date.get(Calendar.DATE);
int month = date.get(Calendar.MONTH);
int year = date.get(Calendar.YEAR);
System.out.println("Date: " + month + " - " + day + " - " + year);
System.out.println("Time: " + date.getTime());
-------
And the output is:
-------
Date: 1 - 26 - 218728
Time: Sun Feb 26 00:00:00 CET 218728
-------
Strange, uh?
Why isn't there an exception?
How can I validate the GregorianCalendar variable?
Thanks.