public class DateUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_DATE_FORMAT_PROPERTY |
static java.lang.String |
DOY |
static java.lang.String |
LITERAL |
static java.lang.String |
ZULU |
Constructor and Description |
---|
DateUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
dateToDOY(java.util.Date date)
Transform a date into a string of the format yyyy-DTHH:mm:ss
|
static java.lang.String |
dateToLiteral(java.util.Date date)
Transform a date into a string of the format dd-MMMMMMMMM-yyyy_HH:mm:ss
|
static java.lang.String |
dateToLiteralNoTime(java.util.Date date)
Transform a date into a string of the format dd-MMMMMMMMM-yyyy
|
static java.lang.String |
dateToTDB(java.util.Date date)
Transform a date into a string on the TDB scale
|
static java.lang.String |
dateToZulu(java.util.Date date)
Transform a date into a string of the format yyyy-MM-ddTHH:mm:ss
|
static java.lang.String |
dateToZuluSlash(java.util.Date date)
Transform a date into a string of the format yyyy/MM/ddTHH:mm:ss.SSS
|
static java.lang.String |
dateToZuluSlashSpace(java.util.Date date)
Transform a date into a string of the format yyyy/MM/dd HH:mm:ss.SSS
|
static java.lang.String |
defaultDateToString(java.util.Date date) |
static java.util.Date |
DOYToDate(java.lang.String zuluTime)
Transform a string of the format yyyy-DTHH:mm:ss into a date
|
static FineTime |
DOYToFineTime(java.lang.String zuluTime)
Transform a string of the format yyyy-DTHH:mm:ss into a FineTime
|
static java.lang.String |
fineTimeTiLiteral(FineTime date)
Transform a FineTime into a string of the format dd-MMMMMMMMM-yyyy_HH:mm:ss
|
static java.lang.String |
fineTimeTiLiteralNoTime(FineTime date)
Transform a FineTime into a string of the format dd-MMMMMMMMM-yyyy
|
static java.lang.String |
fineTimeToDOY(FineTime date)
Transform a FineTime into a string of the format yyyy-DTHH:mm:ss
|
static java.lang.String |
fineTimeToTDB(FineTime date)
Transform a FineTime into a string on the TDB scale
|
static java.lang.String |
fineTimeToZulu(FineTime date)
Transform a FineTime into a string of the format yyyy-MM-ddTHH:mm:ss
|
static java.lang.String |
fineTimeToZuluSlash(FineTime date)
Transform a FineTime into a string of the format yyyy/MM/ddTHH:mm:ss.SSS
|
static java.lang.String |
fineTimeToZuluSlashSpace(FineTime date)
Transform a FineTime into a string of the format yyyy/MM/dd HH:mm:ss.SSS
|
static java.util.Date |
literalToDate(java.lang.String literal)
Transform a string of the format dd-MMMMMMMMM-yyyy_HH:mm:ss into a date
|
static java.util.Date |
literalToDateNoTime(java.lang.String literal)
Transform a string of the format dd-MMMMMMMMM-yyyy into a date
|
static FineTime |
literalToFineTime(java.lang.String literal)
Transform a string of the format dd-MMMMMMMMM-yyyy_HH:mm:ss into a FineTime
|
static FineTime |
literalToFineTimeNoTime(java.lang.String literal)
Transform a string of the format dd-MMMMMMMMM-yyyy into a FineTime
|
static java.util.Date |
parse(java.lang.String date)
Try to parse a date expressed as String trying consecutive formats.
|
static java.util.Date |
TDBToDate(java.lang.String tdbString)
Transform a string on the TDB scale into a date
|
static FineTime |
TDBToFineTime(java.lang.String tdbString)
Transform a string on the TDB scale into a FineTime
|
static java.util.Date |
zuluToDate(java.lang.String zuluTime)
Transform a string of the format yyyy-MM-ddTHH:mm:ss into a date
|
static java.util.Date |
zuluToDateSlash(java.lang.String zuluTime)
Transform a string of the format yyyy/MM/ddTHH:mm:ss.SSS into a date
|
static java.util.Date |
zuluToDateSlashSpace(java.lang.String zuluTime)
Transform a string of the format yyyy/MM/dd HH:mm:ss.SSS into a date
|
static FineTime |
zuluToFineTime(java.lang.String zuluTime)
Transform a string of the format yyyy-MM-ddTHH:mm:ss into a FineTime
|
static FineTime |
zuluToFineTimeSlash(java.lang.String zuluTime)
Transform a string of the format yyyy/MM/ddTHH:mm:ss.SSS into a FineTime
|
static FineTime |
zuluToFineTimeSlashSpace(java.lang.String zuluTime)
Transform a string of the format yyyy/MM/dd HH:mm:ss.SSS into a FineTime
|
public static java.lang.String DEFAULT_DATE_FORMAT_PROPERTY
public static java.lang.String ZULU
public static java.lang.String DOY
public static java.lang.String LITERAL
public static java.util.Date parse(java.lang.String date) throws java.text.ParseException
date
- the date expressed as stringjava.text.ParseException
- if could not find any method to parse the stringpublic static java.lang.String dateToZulu(java.util.Date date)
date
- date to be transformedpublic static java.lang.String fineTimeToZulu(FineTime date)
date
- date to be transformedpublic static java.util.Date zuluToDate(java.lang.String zuluTime) throws java.text.ParseException
zuluTime
- the string to be readjava.text.ParseException
- if string is malformedpublic static FineTime zuluToFineTime(java.lang.String zuluTime) throws java.text.ParseException
zuluTime
- the string to be readjava.text.ParseException
- if string is malformedpublic static java.lang.String dateToZuluSlash(java.util.Date date)
date
- date to be transformedpublic static java.lang.String fineTimeToZuluSlash(FineTime date)
date
- date to be transformedpublic static java.util.Date zuluToDateSlash(java.lang.String zuluTime) throws java.text.ParseException
zuluTime
- the string to be readjava.text.ParseException
- if string is malformedpublic static FineTime zuluToFineTimeSlash(java.lang.String zuluTime) throws java.text.ParseException
zuluTime
- the string to be readjava.text.ParseException
- if string is malformedpublic static java.lang.String dateToZuluSlashSpace(java.util.Date date)
date
- date to be transformedpublic static java.lang.String fineTimeToZuluSlashSpace(FineTime date)
date
- date to be transformedpublic static java.util.Date zuluToDateSlashSpace(java.lang.String zuluTime) throws java.text.ParseException
zuluTime
- the string to be readjava.text.ParseException
- if string is malformedpublic static FineTime zuluToFineTimeSlashSpace(java.lang.String zuluTime) throws java.text.ParseException
zuluTime
- the string to be readjava.text.ParseException
- if string is malformedpublic static java.util.Date DOYToDate(java.lang.String zuluTime) throws java.text.ParseException
zuluTime
- the string to be readjava.text.ParseException
- if string is malformedpublic static FineTime DOYToFineTime(java.lang.String zuluTime) throws java.text.ParseException
zuluTime
- the string to be readjava.text.ParseException
- if string is malformedpublic static java.lang.String dateToDOY(java.util.Date date)
date
- date to be transformedpublic static java.lang.String fineTimeToDOY(FineTime date)
date
- date to be transformedpublic static java.util.Date literalToDate(java.lang.String literal) throws java.text.ParseException
literal
- the string to be readjava.text.ParseException
- if string is malformedpublic static FineTime literalToFineTime(java.lang.String literal) throws java.text.ParseException
literal
- the string to be readjava.text.ParseException
- if string is malformedpublic static java.lang.String dateToLiteral(java.util.Date date)
date
- date to be transformedpublic static java.lang.String fineTimeTiLiteral(FineTime date)
date
- date to be transformedpublic static java.util.Date literalToDateNoTime(java.lang.String literal) throws java.text.ParseException
literal
- the string to be readjava.text.ParseException
- if string is malformedpublic static FineTime literalToFineTimeNoTime(java.lang.String literal) throws java.text.ParseException
literal
- the string to be readjava.text.ParseException
- if string is malformedpublic static java.lang.String dateToLiteralNoTime(java.util.Date date)
date
- date to be transformedpublic static java.lang.String fineTimeTiLiteralNoTime(FineTime date)
date
- date to be transformedpublic static java.util.Date TDBToDate(java.lang.String tdbString) throws java.text.ParseException
tdbString
- the string to be readjava.text.ParseException
public static FineTime TDBToFineTime(java.lang.String tdbString) throws java.text.ParseException
tdbString
- the string to be readjava.text.ParseException
public static java.lang.String dateToTDB(java.util.Date date)
date
- date to be transformedpublic static java.lang.String fineTimeToTDB(FineTime date)
date
- date to be transformedpublic static java.lang.String defaultDateToString(java.util.Date date)