gov.lbl.dsd.firefish.util
Class DateTimeHelper
java.lang.Object
gov.lbl.dsd.firefish.util.DateTimeHelper
- public class DateTimeHelper
- extends Object
Utilities for those crappy XML xsd:DateTime conversions to and from the
nice, easy and straightforward canonical world-wide interoperable coordinated universal time (UTC) format returned by
the System.currentTimeMillis()
, which itself relies on the gettimeofday()
family
of functions existing on every operating system and programming language on this earth.
- Version:
- $Revision: 1.3 $, $Date: 2004/02/06 23:05:35 $
Method Summary |
static long |
parseDateTime(String s)
input must have format yyyy-mm-ddThh:mm:ss[.fff*][([+|-]hh:mm | Z)] |
static String |
toDateTime(long millis)
output has format yyyy-mm-ddThh:mm:ss[.fff*][([+|-]hh:mm | Z)] |
DateTimeHelper
public DateTimeHelper()
parseDateTime
public static long parseDateTime(String s)
throws ParseException
- input must have format yyyy-mm-ddThh:mm:ss[.fff*][([+|-]hh:mm | Z)]
- Throws:
ParseException
toDateTime
public static String toDateTime(long millis)
- output has format yyyy-mm-ddThh:mm:ss[.fff*][([+|-]hh:mm | Z)]
Jump to the Firefish Homepage