org.jopendocument.util
Class XMLDateFormat

java.lang.Object
  extended by java.text.Format
      extended by org.jopendocument.util.XMLDateFormat
All Implemented Interfaces:
Serializable, Cloneable

public class XMLDateFormat
extends Format

Format an absolute Date according to W3C XML Schema 1.0 Part 2, Section 3.2.7-14. I.e. Format.format(Object) always write a time zone part and Format.parseObject(String) will only use the default time zone if none is specified.

Author:
Sylvain CUAZ
See Also:
XMLGregorianCalendar, XMLCalendarFormat, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.text.Format
Format.Field
 
Field Summary
protected static DatatypeFactory factory
           
protected  Locale locale
           
protected  TimeZone tz
           
 
Constructor Summary
XMLDateFormat()
           
XMLDateFormat(TimeZone timezone, Locale aLocale)
           
 
Method Summary
 StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)
           
protected  Locale getLocale()
           
protected  TimeZone getTimeZone()
           
 Date parseObject(String source, ParsePosition pos)
           
 
Methods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected static final DatatypeFactory factory

tz

protected final TimeZone tz

locale

protected final Locale locale
Constructor Detail

XMLDateFormat

public XMLDateFormat()

XMLDateFormat

public XMLDateFormat(TimeZone timezone,
                     Locale aLocale)
Method Detail

format

public StringBuffer format(Object obj,
                           StringBuffer toAppendTo,
                           FieldPosition pos)
Specified by:
format in class Format

parseObject

public Date parseObject(String source,
                        ParsePosition pos)
Specified by:
parseObject in class Format

getTimeZone

protected final TimeZone getTimeZone()

getLocale

protected final Locale getLocale()


Copyright © 2010 jOpenDocument All Rights Reserved.