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 startDate,
Date endDate,
TimeZone timeZone)
|
static DateFormat |
getISO8601Format()
|
static DateFormat |
getISOFormat()
|
static DateFormat |
getISOFormat(String text)
|
static DateFormat |
getUTCFormat()
|
static DateFormat |
getUTCFormat(String text)
|
static Date |
newDate()
|
static Date |
newDate(long date)
|
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 startDate,
Date endDate,
TimeZone timeZone)
getISOFormat
public static DateFormat getISOFormat()
getISOFormat
public static DateFormat getISOFormat(String text)
getISO8601Format
public static DateFormat getISO8601Format()
getUTCFormat
public static DateFormat getUTCFormat()
getUTCFormat
public static DateFormat getUTCFormat(String text)
newDate
public static Date newDate()
newDate
public static Date newDate(long date)