public class DateUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
EPOCH_UNIX_ERA_DAY
Value to add to the day number returned by this calendar to find the Julian
Day number.
|
static long |
MILLISECS_PER_HOUR
Number of milliseconds per hour, except when a leap second is inserted.
|
static long |
MILLISECS_PER_MINUTE
All minutes have this many milliseconds except the last minute of the day on
a day defined with a leap second.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
format(java.util.Date date) |
static java.lang.String |
format(java.time.ZonedDateTime zonedDateTime) |
static java.lang.String |
formatCurrentDate() |
static java.lang.String |
formatDate(java.util.Date date,
java.lang.String format) |
static int |
getDeltaDays(java.util.Date d1,
java.util.Date d2) |
static long |
getJulianDay(java.util.Calendar date) |
static long |
getUnixDay(java.util.Calendar date) |
static java.time.ZonedDateTime |
toZonedDateTime(java.util.Date date) |
static java.util.Date |
trimDateInformation(java.util.Date date) |
static java.util.Date |
trimSecondsAndMillis(java.util.Date date) |
static java.util.Date |
trimTimeInformation(java.util.Date date) |
public static final long MILLISECS_PER_MINUTE
public static final long MILLISECS_PER_HOUR
public static final long EPOCH_UNIX_ERA_DAY
public static long getUnixDay(java.util.Calendar date)
public static long getJulianDay(java.util.Calendar date)
public static int getDeltaDays(java.util.Date d1, java.util.Date d2)
d1
- d2
- public static java.lang.String formatDate(java.util.Date date, java.lang.String format)
public static java.util.Date trimSecondsAndMillis(java.util.Date date)
public static java.util.Date trimTimeInformation(java.util.Date date)
public static java.util.Date trimDateInformation(java.util.Date date)
public static java.lang.String formatCurrentDate()
public static java.lang.String format(java.time.ZonedDateTime zonedDateTime)
public static java.time.ZonedDateTime toZonedDateTime(java.util.Date date)
public static java.lang.String format(java.util.Date date)