This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I've got to do a fair number of date/calendar calculations using the number of months or weeks between dates. With either Date or Calendar objects, its trivial to get the number of days between to objects, but how do you get the number of months? How do you get the number of weeks? Clearly any discussion of months really requires a Calendar, and in this case, I can easily use a GregorianCalendar
Suppose you have two dates, say October 16, 2012 and January 3, 2012. How many months are they appart?
How do I calculate that they are 41 weeks apart? How can I figure out how many Tuesdays are between them?