dsto.dfc.text
Class IsoDateFormat

java.lang.Object
  extended by java.text.Format
      extended by java.text.DateFormat
          extended by java.text.SimpleDateFormat
              extended by dsto.dfc.text.MultiDateFormat
                  extended by dsto.dfc.text.IsoDateFormat
All Implemented Interfaces:
Serializable, Cloneable

public class IsoDateFormat
extends MultiDateFormat

An ISO8601 (ish) date format. Supports dates like "2001-02-01 10:00:00 UTC+8", and shorter forms.

Examples:

   "2001"
   "2001-01-02"
   "2001-01-02 10:14:01" (uses local timezone)
   "2001-01-02 10:14:01 UTC+9:30"
 
See http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html.

Author:
Matthew Phillips
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.text.DateFormat
DateFormat.Field
 
Field Summary
 
Fields inherited from class dsto.dfc.text.MultiDateFormat
defaultFormat, parseFormat
 
Fields inherited from class java.text.DateFormat
AM_PM_FIELD, calendar, DATE_FIELD, DAY_OF_WEEK_FIELD, DAY_OF_WEEK_IN_MONTH_FIELD, DAY_OF_YEAR_FIELD, DEFAULT, ERA_FIELD, FULL, HOUR_OF_DAY0_FIELD, HOUR_OF_DAY1_FIELD, HOUR0_FIELD, HOUR1_FIELD, LONG, MEDIUM, MILLISECOND_FIELD, MINUTE_FIELD, MONTH_FIELD, numberFormat, SECOND_FIELD, SHORT, TIMEZONE_FIELD, WEEK_OF_MONTH_FIELD, WEEK_OF_YEAR_FIELD, YEAR_FIELD
 
Constructor Summary
IsoDateFormat()
          Create a new instance.
 
Method Summary
static IsoDateFormat get()
          Get a shared, thread-local instance.
 
Methods inherited from class dsto.dfc.text.MultiDateFormat
format, parse, parseObject, setDefaultFormat
 
Methods inherited from class java.text.SimpleDateFormat
applyLocalizedPattern, applyPattern, clone, equals, formatToCharacterIterator, get2DigitYearStart, getDateFormatSymbols, hashCode, set2DigitYearStart, setDateFormatSymbols, toLocalizedPattern, toPattern
 
Methods inherited from class java.text.DateFormat
format, format, getAvailableLocales, getCalendar, getDateInstance, getDateInstance, getDateInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getInstance, getNumberFormat, getTimeInstance, getTimeInstance, getTimeInstance, getTimeZone, isLenient, parse, parseObject, setCalendar, setLenient, setNumberFormat, setTimeZone
 
Methods inherited from class java.text.Format
format
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsoDateFormat

public IsoDateFormat()
Create a new instance. Consider using get() instead.

Method Detail

get

public static IsoDateFormat get()
Get a shared, thread-local instance. This should not be cached, since this instance is local to the current thread.



Copyright © 2008 Commonwealth of Australia