Package com.redwood.scheduler.api.date
Class DateFormatter
- java.lang.Object
- 
- com.redwood.scheduler.api.date.DateFormatter
 
- 
 public class DateFormatter extends Object Formatter that extends Java's SimpleDateFormat. Extensions:- Locale support using the syntax "{<locale>}" eg. "{nl}"
- Place holder for parsing Time Zone ID "i"
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static StringTZGENERAL_FIELDprotected static StringTZID_FIELD
 - 
Constructor SummaryConstructors Constructor Description DateFormatter(String newFormat, Locale newLocale)Extended SimpleDateFormatting
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(DateTimeZone value)DateTimeZoneparse(String value)DateTimeZoneparse(TimeZone timeZone, String value)StringtoLocalizedPattern()StringtoPattern()
 
- 
- 
- 
Field Detail- 
TZID_FIELDprotected static final String TZID_FIELD - See Also:
- Constant Field Values
 
 - 
TZGENERAL_FIELDprotected static final String TZGENERAL_FIELD - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
DateFormatterpublic DateFormatter(String newFormat, Locale newLocale) Extended SimpleDateFormatting- Parameters:
- newFormat-
- newLocale-
- Throws:
- InvalidFormatException- if the given format is null
- IllegalArgumentException- if the given format is invalid
- InvalidDateFormatUnknownLocale- if the given format contains a unknown locale id
 
 
- 
 - 
Method Detail- 
formatpublic String format(DateTimeZone value) - Parameters:
- value-
- Returns:
- String
- Throws:
- IllegalArgumentException- if the given format is invalid
 
 - 
parsepublic DateTimeZone parse(String value) throws ParseException - Parameters:
- value-
- Returns:
- DateTimeZone
- Throws:
- ParseException- if the value can not be parsed
- IllegalArgumentException- if the given format is invalid
 
 - 
parsepublic DateTimeZone parse(TimeZone timeZone, String value) throws ParseException - Parameters:
- timeZone-
- value-
- Returns:
- DateTimeZone
- Throws:
- ParseException- if the value can not be parsed
- IllegalArgumentException- if the given format is invalid
 
 - 
toLocalizedPatternpublic String toLocalizedPattern() 
 - 
toPatternpublic String toPattern() 
 
- 
 
-