public class DateUtil
extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ISO_8601_PATTERN |
Constructor and Description |
---|
DateUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
compareTo(Date date1,
Date date2) |
static boolean |
equals(Date date1,
Date date2) |
static String |
formatDate(String fromPattern,
String dateString,
Locale locale) |
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) |
static Date |
parseDate(String pattern,
String dateString,
Locale locale) |
public static final String ISO_8601_PATTERN
public static int compareTo(Date date1, Date date2)
public static boolean equals(Date date1, Date date2)
public static String formatDate(String fromPattern, String dateString, Locale locale) throws ParseException
ParseException
public static String getCurrentDate(String pattern, Locale locale)
public static String getCurrentDate(String pattern, Locale locale, TimeZone timeZone)
public static String getDate(Date date, String pattern, Locale locale)
public static String getDate(Date date, String pattern, Locale locale, TimeZone timeZone)
public static int getDaysBetween(Date date1, Date date2)
public static int getDaysBetween(Date date1, Date date2, TimeZone timeZone)
public static DateFormat getISO8601Format()
public static DateFormat getISOFormat()
public static DateFormat getISOFormat(String text)
public static DateFormat getUTCFormat()
public static DateFormat getUTCFormat(String text)
public static boolean isFormatAmPm(Locale locale)
public static Date newDate()
public static Date newDate(long date)
public static long newTime()
public static Date parseDate(String dateString, Locale locale) throws ParseException
ParseException
public static Date parseDate(String pattern, String dateString, Locale locale) throws ParseException
ParseException