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(Locale locale)
Converts the current Date to a String date
|
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,
Locale locale)
Converts a Timestamp value to a String date
|
static String |
getDefaultPattern(Locale locale)
Return the pattern for date
|
public 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 © 2020 City of Paris. All rights reserved.