This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I'll leave it up to you how to handle the case where the years are different. Hint: it includes cal1.get(Calendar.YEAR) to get the year, cal1.add(Calendar.YEAR, 1) to add one year and cal1.getActualMaximum(Calendar.DAY_OF_YEAR) to get the number of days in the calendar's current year.