Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.7.10
-
None
Description
People often need to re-parse Dates out of strings created from date.toString().
My particular system's default date.toString() format is "Thu Apr 20 00:27:00 CEST 2006" so I know I can turn a Date into a string and then back into an object using Date.parse('EEE MMM dd HH:mm:ss z yyyy', new Date().toString()).
But breaks when date.toString() changes format, either in a future version of Groovy or when the code moves to another system where date.toString() produces a different format (I'm not clear if this can happen or not).