Question: When setting issue estimates in JIRA, you can enter a string like `"1d 2h 30m"` and JIRA will translate this (I'm assuming) into a corresponding number of milliseconds.

Is there an available Java library that does this?

I'm using a Spring managed bean that takes a property indicating how often a directory ought to be purged, and I'd like to allow the configuration to take a human-readable string rather than an explicit number of milliseconds.

Alternatively, if there's a better approach I'm not thinking of, I'd love to hear it.

Answer: 
Take a look at [joda-time](http://joda-time.sourceforge.net/)'s [PeriodConverter](http://joda-time.sourceforge.net/api-release/org/joda/time/convert/PeriodConverter.html). I have never used this part of the joda-time library myself, but it looks like it does what you need.

In general, for date/time stuff, look at joda-time first :)
Maybe [cron expressions](http://en.wikipedia.org/wiki/CRON_expression) would be more helpful for your current task at hand: specyfing how often something should happen. This format is quite flexible, well known and understood. To drive your bean that is doing the periodic chore you could, use the Quartz scheduler, EJB3 timer annotations or the Spring timer annotations.