Henry's onto a winner there, but if you really must have an API just for this I suggest
Joda Time.
Its very handy but for what you described its overkill and will take you longer to download, add to classpath, read the docs to understand how to use it to solve your particular problem and then write the code.
With Henry's solution you can skip the docs except to check input perhaps, Sun's javadocs also often have useful snippets of code so you can solve this one in a couple of minutes using standard API.