public class DateUtilStaticExtensions
extends java.lang.Object
| Constructor and Description |
|---|
DateUtilStaticExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Date |
parse(java.util.Date self,
java.lang.String format,
java.lang.String input)
Parse a String into a Date instance using the given pattern.
|
static java.util.Date |
parse(java.util.Date self,
java.lang.String format,
java.lang.String input,
java.util.TimeZone zone)
Parse a String into a Date instance using the given pattern and TimeZone.
|
static java.util.Date |
parseToStringDate(java.util.Date self,
java.lang.String dateToString)
Parse a String matching the pattern EEE MMM dd HH:mm:ss zzz yyyy
containing US-locale-constants only (e.g.
|
public static java.util.Date parse(java.util.Date self,
java.lang.String format,
java.lang.String input)
throws java.text.ParseException
SimpleDateFormat.
Note that a new SimpleDateFormat instance is created for every invocation of this method (for thread safety).
self - placeholder variable used by Groovy categories; ignored for default static methodsformat - pattern used to parse the input string.input - String to be parsed to create the date instancejava.text.ParseException - if there is a parse errorDateFormat.parse(java.lang.String)public static java.util.Date parse(java.util.Date self,
java.lang.String format,
java.lang.String input,
java.util.TimeZone zone)
throws java.text.ParseException
SimpleDateFormat.
Note that a new SimpleDateFormat instance is created for every invocation of this method (for thread safety).
self - placeholder variable used by Groovy categories; ignored for default static methodsformat - pattern used to parse the input string.input - String to be parsed to create the date instancezone - TimeZone to use when parsingjava.text.ParseException - if there is a parse errorDateFormat.parse(java.lang.String)public static java.util.Date parseToStringDate(java.util.Date self,
java.lang.String dateToString)
throws java.text.ParseException
Date
Note that a new SimpleDateFormat instance is created for every invocation of this method (for thread safety).
self - placeholder variable used by Groovy categories; ignored for default static methodsdateToString - String to be parsed to create the date instance. Must match the pattern EEE MMM dd HH:mm:ss zzz yyyy with US-locale symbolsjava.text.ParseException - if there is a parse error