Here we go, into the land of dates and times. Dates are not the sorts of things I think are fun. I find dates cruel , punishing, and difficult to wield in different languages. It's surprising. I would think that dates would be fairly straightforward ”after all, we've had dates for a long time. Our various calendars are more or less elegant, but their implementation and use in programming languages often seems to fall short of the mark. They are complicated, messy things.
Everybody knows what dates are and I wager that few readers are interested in knowing how and why they work the way they do in Java. I wager that you want a few utility methods that will just help you solve your current problem, no questions asked. If I'm wrong, the Java API makes terrific , suspense -filled reading.