edu.iris.Fissures.model
Class ISOTime

java.lang.Object
  extended by edu.iris.Fissures.model.ISOTime

public class ISOTime
extends Object

ISOTime.java Created: Fri Jul 9 13:45:39 1999

Version:
Author:
Philip Crotwell

Field Summary
protected  MicroSecondDate date
           
protected  String orig
           
static String[] patterns
           
 
Constructor Summary
ISOTime(int year, int jday, int hour, int minute, float second)
           
ISOTime(String s)
          parses a ISO8601 string into its component parts.
 
Method Summary
protected  String cleanDate(String s)
           
 Calendar getCalendar()
          Get a java.unil.Calendar object initialized to be this ISOTime.
 MicroSecondDate getDate()
           
static String getISOString(Date ms)
           
static String getISOString(int year, int jday, int hour, int minute, float second)
           
static String getISOString(MicroSecondDate ms)
           
 String getOrigString()
           
static void main(String[] args)
          just for testing, parses and outputs a few ISO8601 strings.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

patterns

public static final String[] patterns

date

protected MicroSecondDate date

orig

protected String orig
Constructor Detail

ISOTime

public ISOTime(String s)
        throws UnsupportedFormat
parses a ISO8601 string into its component parts. Currently we only support the 4 month based, full formats, yyyy-mm-ddThh:mm:ss.ddddZTD yyyy-mm-ddThhmmss.ddddZTD yyyymmddThh:mm:ss.ddddZTD yyyymmddThhmmss.ddddZTD, plus the similar julian day formats, yyyyjjjThh:mm:ss.ddddZTD and yyyyjjjThhmmss.ddddZTD. The time zone part, ZTD, is either Z for zulu, ie UTC, or a offset from UTC in the form of +hh:mm or -hh:mm.

Throws:
UnsupportedFormat

ISOTime

public ISOTime(int year,
               int jday,
               int hour,
               int minute,
               float second)
Method Detail

getISOString

public static String getISOString(int year,
                                  int jday,
                                  int hour,
                                  int minute,
                                  float second)

cleanDate

protected String cleanDate(String s)

getOrigString

public String getOrigString()

getCalendar

public Calendar getCalendar()
Get a java.unil.Calendar object initialized to be this ISOTime. Note that a reduction of precision may occur as the default GregorianCalendar only supports millisecond precision.


getDate

public MicroSecondDate getDate()

getISOString

public static String getISOString(MicroSecondDate ms)

getISOString

public static String getISOString(Date ms)

toString

public String toString()
Overrides:
toString in class Object

main

public static void main(String[] args)
just for testing, parses and outputs a few ISO8601 strings.



Copyright © 1999-2007 The IRIS Consortium. All Rights Reserved.