title: Formatting a period of time
body: <p>In Java I have a long integer representing a period of time in milliseconds. The time period could be anything from a couple of seconds to a number of weeks. I would like to output this time period as a String with the appropriate unit.</p>
  
  <p>For example 3,000 should be output as "3 seconds", 61,200,000 should be output as "17 hours" and 1,814,400,000 should be output as "3 weeks".</p>
  
  <p>Ideally I would also be able to fine-tune the formatting of sub-units, e.g. 62,580,000 might be output as "17 hours, 23 minutes".</p>
  
  <p>Are there any existing Java classes that handle this?</p>