|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oodt.commons.util.DateConvert
public class DateConvert
The DateConvert class is intended to provide date/time
conversion and parse routines. For a description of the syntax of the
format strings see SimpleDateFormat.
| Constructor Summary | |
|---|---|
DateConvert()
Constructor given no arguments. |
|
| Method Summary | |
|---|---|
static String |
dbmsFormat(Date inputDate)
Format the given date and return the resulting string in a DBMS format. |
static Date |
dbmsParse(String inputString)
Parse the given date/time string in DBMS format and return the resulting Date object. |
static String |
doyFormat(Date inputDate)
Format the given date and return the resulting string in CCSDS ASCII Time Code B format. |
static Date |
doyParse(String inputString)
Parse the given date/time string in CCSDS ASCII Time Code B format and return the resulting Date object. |
static long |
getMsecsInDay()
Get the number of milliseconds in a day. |
static long |
getMsecsInHour()
Get the number of milliseconds in an hour. |
static long |
getMsecsInMinute()
Get the number of milliseconds in a minute. |
static String |
isoFormat(Date inputDate)
Format the given date and return the resulting string in ISO 8601 format. |
static Date |
isoParse(String inputString)
Parse the given date/time string in ISO 8601 format and return the resulting Date object. |
static String |
tsFormat(Date inputDate)
Format the given date and return the resulting string in a timestamp format. |
static Date |
tsParse(String inputString)
Parse the given date/time string in timestamp format and return the resulting Date object. |
static String |
ymdFormat(Date inputDate)
Format the given date and return the resulting string in a year-month-day format. |
static Date |
ymdParse(String inputString)
Parse the given date/time string in year-month-day format and return the resulting Date object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateConvert()
throws IllegalStateException
IllegalStateException - If the class is instantiated.| Method Detail |
|---|
public static String isoFormat(Date inputDate)
inputDate - The date to be converted into string format.
public static Date isoParse(String inputString)
throws ParseException
Date object.
The format is as follows: "yyyy-MM-dd'T'HH:mm:ss.SSS[Z|[+|-]HH:mm]".
inputString - The string to be parsed.
ParseException - If the string is null or does not match the date/time
format.public static String doyFormat(Date inputDate)
inputDate - The date to be converted into string format.
public static Date doyParse(String inputString)
throws ParseException
Date object.
The format is as follows: "yyyy-DDD'T'HH:mm:ss.SSS".
inputString - The string to be parsed.
ParseException - If the string does not match the date/time
format.public static String tsFormat(Date inputDate)
inputDate - The date to be converted into string format.
public static Date tsParse(String inputString)
throws ParseException
Date object.
The format is as follows: "yyyyMMddHHmmssSSS".
inputString - The string to be parsed.
ParseException - If the string does not match the date/time
format.public static String dbmsFormat(Date inputDate)
inputDate - The date to be converted into string format.
public static Date dbmsParse(String inputString)
throws ParseException
Date object.
The format is as follows: "dd-MMM-yyyy HH:mm:ss".
inputString - The string to be parsed.
ParseException - If the string does not match the date/time
format.public static String ymdFormat(Date inputDate)
inputDate - The date to be converted into string format.
public static Date ymdParse(String inputString)
throws ParseException
Date object.
The format is as follows: "yyyy-MM-dd".
inputString - The string to be parsed.
ParseException - If the string does not match the date/time
format.public static long getMsecsInMinute()
public static long getMsecsInHour()
public static long getMsecsInDay()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||