public final class DateUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static long |
convertDaysInMiliseconds(long lDays)
Get the number of milliseconds in a given number of days
|
static Date |
formatDate(String strDate,
Locale locale)
Get the date from String date
The format pattern is specified internaly
|
static Date |
formatDateLongYear(String strDate,
Locale locale)
Get the date from String date
|
static Date |
formatDateSql(String strDate,
Locale locale)
Get the
Date from String date
The format pattern is specified internaly |
static Timestamp |
formatTimestamp(String strDate,
Locale locale)
Get the
Timestamp from String date
The format pattern is specified internaly |
static String |
getCurrentDateString()
Deprecated.
Use getCurrentDateString( Locale locale )
|
static String |
getCurrentDateString(Locale locale)
Converts the current Date to a String date
|
static Date |
getDate(String strDate)
Deprecated.
Use formatDate( String strDate, Locale locale )
|
static Date |
getDateSql(String strDate)
Deprecated.
Use formatDateSql( String strDate, Locale locale )
|
static String |
getDateString(Date date)
Deprecated.
Use getDateString( Date date, Locale locale )
|
static String |
getDateString(Date date)
Deprecated.
Use formatDate( String strDate, Locale locale )
|
static String |
getDateString(Date date,
Locale locale)
Convert the date to String with a standard pattern
|
static String |
getDateString(long lTime,
Locale locale)
Converts a long value to a String date
|
static String |
getDateString(Timestamp date)
Deprecated.
Use getDateString( java.sql.Timestamp date, Locale locale )
|
static String |
getDateString(Timestamp date,
Locale locale)
Converts a Timestamp value to a String date
|
static String |
getDateTimeString(long lTime)
Converts a long value to a String date in a "jj/mm/aaaa hh:mm" format
|
static String |
getDefaultPattern(Locale locale)
Return the pattern for date
|
static Timestamp |
getTimestamp(String strDate)
Deprecated.
Use formatTimestamp( String strDate, Locale locale )
|
public static String getCurrentDateString()
public static Date getDateSql(String strDate)
strDate - The String Date to convert, in a date in the "jj/mm/aaaa" formatpublic static Date getDate(String strDate)
strDate - The String Date to convert, in a date in the "jj/mm/aaaa" formatpublic static Timestamp getTimestamp(String strDate)
strDate - The String Date to convert, in a date in the "jj/mm/aaaa" formatpublic static String getDateString(Date date)
date - java.sql.Date date to convertpublic static String getDateString(Timestamp date)
date - java.sql.Timestamp date to convertpublic static String getDateString(Date date)
date - java.util.Date date to convertpublic static String getDateTimeString(long lTime)
lTime - The long value to convertpublic static Date formatDate(String strDate, Locale locale)
strDate - the date to formatlocale - The Localepublic static Date formatDateLongYear(String strDate, Locale locale)
strDate - the date to formatlocale - The Localepublic static Timestamp formatTimestamp(String strDate, Locale locale)
Timestamp from String date
The format pattern is specified internalystrDate - the date to formatlocale - The LocaleTimestamp or null elsepublic static Date formatDateSql(String strDate, Locale locale)
Date from String date
The format pattern is specified internalystrDate - the date to formatlocale - The LocaleDate or null elsepublic static String getDateString(Date date, Locale locale)
date - The date to convertlocale - The Localepublic static String getDateString(long lTime, Locale locale)
lTime - The long value to convertlocale - the localepublic static String getDateString(Timestamp date, Locale locale)
date - The datelocale - the localepublic static String getCurrentDateString(Locale locale)
locale - the localepublic static String getDefaultPattern(Locale locale)
locale - the Localepublic static long convertDaysInMiliseconds(long lDays)
lDays - The number of daysCopyright © 2016 City of Paris. All rights reserved.