edu.iris.Fissures.model
Class ISOTime
java.lang.Object
edu.iris.Fissures.model.ISOTime
public class ISOTime
- extends Object
ISOTime.java Created: Fri Jul 9 13:45:39 1999
- Version:
- Author:
- Philip Crotwell
|
Constructor Summary |
ISOTime(int year,
int jday,
int hour,
int minute,
float second)
|
ISOTime(String s)
parses a ISO8601 string into its component parts. |
patterns
public static final String[] patterns
date
protected MicroSecondDate date
orig
protected String orig
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)
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.