moos.ssds.model
Class XmlDateFormat

java.lang.Object
  extended bymoos.ssds.model.XmlDateFormat

public final class XmlDateFormat
extends java.lang.Object

Class for formatting and parsing dates in the format specifed by the W3C XML Schema 2 standard

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement. This information should not be published or distributed to third parties without specific written permission from MBARI.

Copyright 2002 MBARI. MBARI Proprietary Information. All rights reserved.

Version:
: $Revision: 1.1 $
Author:
: $Author: kgomes $

Constructor Summary
XmlDateFormat()
           
 
Method Summary
 java.lang.String format(java.util.Date date)
          Format a date as the standard used in XML
 java.lang.String formatCompact(java.util.Date date)
          Format a date as a string.
 java.util.Date parse(java.lang.String source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDateFormat

public XmlDateFormat()
Method Detail

format

public java.lang.String format(java.util.Date date)
Format a date as the standard used in XML

Parameters:
date - The date to convert to a string representation
Returns:
A compact GMT representation. Example 2003-05-05T16:11:44Z
Since:
Apr 5, 2003

formatCompact

public java.lang.String formatCompact(java.util.Date date)
Format a date as a string. This is a compact format used for generating filenames

Parameters:
date - The data to convert to a string representation
Returns:
A compact GMT representation. Example 20030505T161144
Since:
May 5, 2003

parse

public java.util.Date parse(java.lang.String source)