I am trying to convert strings like 1h 30m 5s or 5m or 38s or 1h 3s into an integer value representing total time in seconds. So for example, 1m 20s would result in an integer value of 80 for 80 seconds. I am using Joda Time: Throws an IllegalArgumentException with practically every string i pass in, saying “Invalid format”.