|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfedora.server.utilities.DateUtility
public abstract class DateUtility
Title: DateUtility.java
Description: A collection of utility methods for performing
frequently required tasks.
| Constructor Summary | |
|---|---|
DateUtility()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
convertDateToDateString(java.util.Date date)
Converts an instance of java.util.Date into a String using the date format: yyyy-MM-ddZ. |
static java.lang.String |
convertDateToString(java.util.Date date)
Converts an instance of java.util.Date into a String using the date format: yyyy-MM-ddTHH:mm:ss.SSSZ. |
static java.lang.String |
convertDateToString(java.util.Date date,
boolean millis)
Converts an instance of java.util.Date into an ISO 8601 String representation. |
static java.lang.String |
convertDateToTimeString(java.util.Date date)
Converts an instance of java.util.Date into a String using the date format: HH:mm:ss.SSSZ. |
static java.lang.String |
convertDateToXSDString(java.util.Date date)
Converts an instance of Date into the canonical lexical
representation of an XSD dateTime with the following exceptions:
- Dates before 1 CE (i.e. |
static java.util.Date |
convertStringToDate(java.lang.String dateTime)
Converts a datetime string into and instance of java.util.Date using the date format: yyyy-MM-ddTHH:mm:ss.SSSZ. |
static java.util.Date |
parseDateAsUTC(java.lang.String dateString)
Attempt to parse the given string of form: yyyy-MM-dd[THH:mm:ss[.SSS][Z]] as a Date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateUtility()
| Method Detail |
|---|
public static java.util.Date convertStringToDate(java.lang.String dateTime)
Converts a datetime string into and instance of java.util.Date using the date format: yyyy-MM-ddTHH:mm:ss.SSSZ.
Follows Postel's Law (lenient about what it accepts, as long as it's sensible)
dateTime - A datetime string
public static java.lang.String convertDateToString(java.util.Date date)
Converts an instance of java.util.Date into a String using the date format: yyyy-MM-ddTHH:mm:ss.SSSZ.
date - Instance of java.util.Date.
public static java.lang.String convertDateToString(java.util.Date date,
boolean millis)
date - Instance of java.util.Date.millis - Whether or not the return value should include milliseconds.
public static java.lang.String convertDateToXSDString(java.util.Date date)
Date into the canonical lexical
representation of an XSD dateTime with the following exceptions:
- Dates before 1 CE (i.e. 1 AD) are handled according to ISO 8601:2000
Second Edition:
"0000" is the lexical representation of 1 BCE
"-0001" is the lexical representation of 2 BCE
date - Instance of java.util.Date.
public static java.lang.String convertDateToDateString(java.util.Date date)
Converts an instance of java.util.Date into a String using the date format: yyyy-MM-ddZ.
date - Instance of java.util.Date.
public static java.lang.String convertDateToTimeString(java.util.Date date)
Converts an instance of java.util.Date into a String using the date format: HH:mm:ss.SSSZ.
date - Instance of java.util.Date.
public static java.util.Date parseDateAsUTC(java.lang.String dateString)
dateString - the date string to parse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||