com.liferay.portal.kernel.util
Class DateUtil
java.lang.Object
com.liferay.portal.kernel.util.DateUtil
public class DateUtil
- extends Object
Method Summary |
static int |
compareTo(Date date1,
Date date2)
|
static int |
compareTo(Date date1,
Date date2,
boolean ignoreMilliseconds)
|
static boolean |
equals(Date date1,
Date date2)
|
static boolean |
equals(Date date1,
Date date2,
boolean ignoreMilliseconds)
|
static String |
getCurrentDate(String pattern,
Locale locale)
|
static String |
getCurrentDate(String pattern,
Locale locale,
TimeZone timeZone)
|
static String |
getDate(Date date,
String pattern,
Locale locale)
|
static String |
getDate(Date date,
String pattern,
Locale locale,
TimeZone timeZone)
|
static int |
getDaysBetween(Date date1,
Date date2)
|
static int |
getDaysBetween(Date date1,
Date date2,
TimeZone timeZone)
|
static DateFormat |
getISO8601Format()
|
static DateFormat |
getISOFormat()
|
static DateFormat |
getISOFormat(String text)
|
static DateFormat |
getUTCFormat()
|
static DateFormat |
getUTCFormat(String text)
|
static boolean |
isFormatAmPm(Locale locale)
|
static Date |
newDate()
|
static Date |
newDate(long date)
|
static long |
newTime()
|
static Date |
parseDate(String dateString,
Locale locale)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ISO_8601_PATTERN
public static final String ISO_8601_PATTERN
- See Also:
- Constant Field Values
DateUtil
public DateUtil()
compareTo
public static int compareTo(Date date1,
Date date2)
compareTo
public static int compareTo(Date date1,
Date date2,
boolean ignoreMilliseconds)
equals
public static boolean equals(Date date1,
Date date2)
equals
public static boolean equals(Date date1,
Date date2,
boolean ignoreMilliseconds)
getCurrentDate
public static String getCurrentDate(String pattern,
Locale locale)
getCurrentDate
public static String getCurrentDate(String pattern,
Locale locale,
TimeZone timeZone)
getDate
public static String getDate(Date date,
String pattern,
Locale locale)
getDate
public static String getDate(Date date,
String pattern,
Locale locale,
TimeZone timeZone)
getDaysBetween
public static int getDaysBetween(Date date1,
Date date2)
getDaysBetween
public static int getDaysBetween(Date date1,
Date date2,
TimeZone timeZone)
getISO8601Format
public static DateFormat getISO8601Format()
getISOFormat
public static DateFormat getISOFormat()
getISOFormat
public static DateFormat getISOFormat(String text)
getUTCFormat
public static DateFormat getUTCFormat()
getUTCFormat
public static DateFormat getUTCFormat(String text)
isFormatAmPm
public static boolean isFormatAmPm(Locale locale)
newDate
public static Date newDate()
newDate
public static Date newDate(long date)
newTime
public static long newTime()
parseDate
public static Date parseDate(String dateString,
Locale locale)
throws ParseException
- Throws:
ParseException