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 :)
As far as I know, no. I believe you would have to convert those numbers yourself into Calendar (GregorianCalendar) and then from there you can proceed to get the milliseconds, which you probably already know which is why you posted this for the hope of a better answer.

My vote: If no one else can find one perhaps now is a good time to start one yourself and contribute it to the community. :)