public class DateUtils
extends org.apache.commons.lang3.time.DateUtils
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.lang3.time.FastDateFormat |
DATE_FORMAT |
static org.apache.commons.lang3.time.FastDateFormat |
DATEMIN_FORMAT |
static org.apache.commons.lang3.time.FastDateFormat |
DATETIME_FORMAT |
static org.apache.commons.lang3.time.FastDateFormat |
JDK_TIME_FORMAT |
static long |
START_SECOND |
static Date |
ZERO |
| Constructor and Description |
|---|
DateUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
formatTime(Date date,
org.apache.commons.lang3.time.FastDateFormat fastDateFormat) |
static long |
getCurrentShortSecond() |
static Date |
now() |
static Date |
parse(Object value) |
static long |
parseDuration(String duration)
Parse a duration
|
static void |
registerFormat(String format) |
static void |
registerFormat(String format,
TimeZone timeZone) |
static void |
registerFormat(String format,
TimeZone timeZone,
Locale locale) |
static long |
toNormalSecond(long shortSecond) |
static long |
toShortSecond(long timestamp) |
addDays, addHours, addMilliseconds, addMinutes, addMonths, addSeconds, addWeeks, addYears, ceiling, ceiling, ceiling, getFragmentInDays, getFragmentInDays, getFragmentInHours, getFragmentInHours, getFragmentInMilliseconds, getFragmentInMilliseconds, getFragmentInMinutes, getFragmentInMinutes, getFragmentInSeconds, getFragmentInSeconds, isSameDay, isSameDay, isSameInstant, isSameInstant, isSameLocalTime, iterator, iterator, iterator, parseDate, parseDate, parseDateStrictly, parseDateStrictly, round, round, round, setDays, setHours, setMilliseconds, setMinutes, setMonths, setSeconds, setYears, toCalendar, truncate, truncate, truncate, truncatedCompareTo, truncatedCompareTo, truncatedEquals, truncatedEqualspublic static final org.apache.commons.lang3.time.FastDateFormat JDK_TIME_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat DATETIME_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat DATEMIN_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat DATE_FORMAT
public static final Date ZERO
public static final long START_SECOND
public static void registerFormat(String format)
public static Date now()
public static long toShortSecond(long timestamp)
public static long toNormalSecond(long shortSecond)
public static long getCurrentShortSecond()
public static long parseDuration(String duration)
duration - 3h, 2m, 7s, 500msCopyright © 2015–2023 cn.gtmap. All rights reserved.