public class DateUtils extends Object
| Constructor and Description |
|---|
DateUtils() |
| Modifier and Type | Method and Description |
|---|---|
static long |
acquireMillisBetween(LocalDateTime start,
LocalDateTime end)
Acquire millis between long.
|
static long |
acquireMinutesBetween(LocalDateTime start,
LocalDateTime end)
acquireMinutesBetween.
|
static LocalDateTime |
formatLocalDateTimeFromTimestamp(Long timestamp)
Format local date time from timestamp local date time.
|
static LocalDateTime |
formatLocalDateTimeFromTimestampBySystemTimezone(Long timestamp)
Format local date time from timestamp by system time zone.
|
static String |
localDateTimeToString(LocalDateTime localDateTime)
Format local date time to string.
|
static String |
localDateTimeToString(LocalDateTime localDateTime,
String pattern)
Format local date time to string.
|
static LocalDateTime |
parseLocalDateTime(String dataTime)
parseLocalDateTime.
|
static LocalDateTime |
parseLocalDateTime(String dataTime,
String dateTimeFormatter)
Parse local date time local date time.
|
public static LocalDateTime parseLocalDateTime(String dataTime)
dataTime - date StringLocalDateTimepublic static LocalDateTime parseLocalDateTime(String dataTime, String dateTimeFormatter)
dataTime - the data timedateTimeFormatter - the date time formatterpublic static long acquireMinutesBetween(LocalDateTime start, LocalDateTime end)
start - this is start date.end - this is start date.public static long acquireMillisBetween(LocalDateTime start, LocalDateTime end)
start - the startend - the endpublic static LocalDateTime formatLocalDateTimeFromTimestamp(Long timestamp)
timestamp - the timestamppublic static LocalDateTime formatLocalDateTimeFromTimestampBySystemTimezone(Long timestamp)
timestamp - the timestamppublic static String localDateTimeToString(LocalDateTime localDateTime)
localDateTime - the localDateTimepublic static String localDateTimeToString(LocalDateTime localDateTime, String pattern)
localDateTime - the localDateTimepattern - formatter patternCopyright © 2021 The Apache Software Foundation. All rights reserved.