I am coding this with Groovy
I am currently trying to convert a string that I have to a date without having to do anything too tedious.
String theD
JChronic is your best choice. Here's an example that adds a .fromString() method to the Date class that parses just about anything you can throw at it:
Date.metaClass.'static'.fromString = { str ->
com.mdimension.jchronic.Chronic.parse(str).beginCalendar.time
}
You can call it like this:
println Date.fromString("Tue Aug 10 16:02:43 PST 2010")
println Date.fromString("july 1, 2012")
println Date.fromString("next tuesday")