public class ISO8601DateFormatter
extends java.lang.Object
Constructor and Description |
---|
ISO8601DateFormatter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
format(java.util.Date date)
Format a date object to ISO8601 format like "2011-01-31T17:16:38.500-05:00"
|
static java.util.Date |
parseDate(java.lang.String iso8601Str)
Converts an ISO8601 date string like "2011-01-31T17:16:38.500-05:00" to a
Date object
|
public static java.util.Date parseDate(java.lang.String iso8601Str) throws java.text.ParseException
iso8601Str
- the date stringjava.text.ParseException
- if the date is not in a valid formatpublic static java.lang.String format(java.util.Date date)
date
- the Date objectCopyright © 2011 Emmanuel Cecchet - University of Massachusetts - All Rights Reserved.