// First define a Calendar, you must institerate using getInstance ()
Calendar acalendar = calendar.getinstance ();
// Setting time is
2004
year
8
month
30
day
// Inside the wild can be directly inserted into the Date type
Aclendar.Settime (2004, Calendar.Auguest, 30);
/ / Which day is calculated this date?
INT day1 = aclendar.get (calendar.day_of_year);
Aclendar.Settime (2004, Calendar.Auguest, 30);
INT day2 = aclendar.get (calendar.day_of_year);
// Discover the two days of separation
SetNumberOfDays (day2-day1);
// Add 1 unit to the year, can increase the month, date
Aclendar.add (Calendar.Year, 1);