![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e379. Determining the Day-of-Week for a Particular DateThe day-of-week is an integer value where 1 is Sunday, 2 is Monday, ..., and 7 is SaturdayCalendar xmas = new GregorianCalendar(1998, Calendar.DECEMBER, 25); int dayOfWeek = xmas.get(Calendar.DAY_OF_WEEK); // 6=Friday Calendar cal = new GregorianCalendar(2003, Calendar.JANUARY, 1); dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); // 4=Wednesday
e374. Creating a Date Object for a Particular Date e375. Determining the Number of Days in a Month e376. Comparing Dates e377. Determining a Person's Age e378. Determining If a Year Is a Leap Year
© 2002 Addison-Wesley. |