View Javadoc

1   package org.astrogrid.security;
2   
3   import java.text.SimpleDateFormat;
4   
5   
6   /***
7    * A formatter and parser for ISO8601 date-time notatation.
8    *
9    * This class extends <code>java.text.SimpleDateFormat</code>
10   * to specify a particular pattern for the format. The format
11   * is specified at construction, so no other methods of the
12   * superclass need be overridden.
13   *
14   * @author Guy Rixon
15   */
16  public class Iso8601DateFormat extends SimpleDateFormat {
17  
18    /***
19     * Constructs an Iso8601DateFormat.
20     */
21    public Iso8601DateFormat () {
22      super("yyyy-MM-dd'T'HH:mm:ss'Z'");
23      // @TODO: sort out time zones
24    }
25  
26  }