Monday, October 13, 2003 11:11 AM
java.util.GregorianCalendar cal = new java.util.GregorianCalendar();
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH);
int date = cal.get(Calendar.DATE);
Note that the GregorianCalendar you create will use the time, date and time zone your computer is using, unless you sent it's constructor the appropriate variables. Check out the API for how to use it more extensively.
Also note that the month integer of January is 0 and not 1. So December is 11 and not 12.