public class DateUtility extends Object
Constructor and Description |
---|
DateUtility() |
Modifier and Type | Method and Description |
---|---|
static String |
getXSDDateTime(Date date)
Convenience method that accepts a
Date . |
static String |
getXSDDateTime(org.joda.time.DateTime dateTime)
Formats a
DateTime as an xsd:dateTime in canonical form. |
static org.joda.time.format.DateTimeFormatter |
getXSDFormatter(org.joda.time.DateTime date) |
static org.joda.time.format.DateTimeFormatter |
getXSDFormatter(int millisLength)
Returns an xsd:dateTime formatter with the specified millisecond precision.
|
static org.joda.time.DateTime |
parseXSDDateTime(String input)
Parses lexical representations of xsd:dateTimes, e.g.
|
public static org.joda.time.DateTime parseXSDDateTime(String input)
Note: fractional seconds are only supported to three digits of precision.
input
- an XML Schema 1.1 dateTimepublic static String getXSDDateTime(Date date)
Date
.date
- getXSDFormatter(DateTime)
public static String getXSDDateTime(org.joda.time.DateTime dateTime)
DateTime
as an xsd:dateTime in canonical form.
Note: fractional seconds are only supported to a maximum of three digits.
dateTime
- public static org.joda.time.format.DateTimeFormatter getXSDFormatter(org.joda.time.DateTime date)
public static org.joda.time.format.DateTimeFormatter getXSDFormatter(int millisLength)
millisLength
- number of digits of millisecond precision. Currently,
only 0-3 are valid arguments.Copyright © 2010-2013 MediaShelf. All Rights Reserved.