Package dev.webfx.platform.util.time
Class Times
java.lang.Object
dev.webfx.platform.util.time.Times
- Author:
- Bruno Salmon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Instantstatic LocalDateasLocalDate(Object value) static LocalDateTimeasLocalDateTime(Object value) static LocalTimeasLocalTime(Object value) static LocalDateTimeepochMillisToLocalDateTime(long epochMillis, ZoneOffset offset) static LocalDateTimeepochMillisUtcToLocalDateTime(long epochMillis) static Instantstatic ObjectfastToInstantIfIsoString(Object value) static Stringstatic Stringstatic Stringformat(LocalDateTime dateTime, String pattern) Formats a datestatic Stringformat(ZonedDateTime dateTime, String pattern) static Stringstatic StringformatIso(LocalDateTime date) static booleanstatic booleanisBetween(LocalDateTime dateToCheck, LocalDateTime startDate, LocalDateTime endDate) static booleanstatic booleanstatic booleanisFuture(LocalDateTime date) static booleanisFuture(LocalDateTime date, Clock clock) static booleanstatic booleanstatic booleanisPast(LocalDateTime date) static booleanisPast(LocalDateTime date, Clock clock) static longlocalDateTimeToEpochMillis(LocalDateTime dateTime, ZoneOffset offset) static longlocalDateTimeToEpochMillisUtc(LocalDateTime dateTime) static Instantstatic LocalDatestatic LocalDateTimestatic Instantstatic LocalDatetoLocalDate(Object value) static LocalDatestatic LocalDateTimestatic LocalDateTimetoLocalDateTime(Object value) static LocalDateTimestatic LocalDateTimetoLocalDateTime(LocalDate localDate) static LocalDateTimetoLocalDateTime(LocalTime localTime)
-
Constructor Details
-
Times
public Times()
-
-
Method Details
-
asInstant
-
asLocalDateTime
-
asLocalDate
-
asLocalTime
-
parseIsoInstant
-
fastCheckParseIsoInstant
-
fastToInstantIfIsoString
-
parseIsoLocalDate
-
parseIsoLocalDateTime
-
toInstant
-
formatIso
-
toLocalDateTime
-
toLocalDateTime
-
toLocalDateTime
-
toLocalDateTime
-
toLocalDateTime
-
toLocalDate
-
toLocalDate
-
epochMillisUtcToLocalDateTime
-
epochMillisToLocalDateTime
-
localDateTimeToEpochMillisUtc
-
localDateTimeToEpochMillis
-
format
-
format
Formats a date- Parameters:
dateTime- the date to formatpattern- the format pattern, ex: dd/MM/yyyy HH:mm:ss- Returns:
- the formatted date
-
formatIso
-
format
-
format
-
isPast
-
isPast
-
isFuture
-
isFuture
-
isBetween
-
isPast
-
isPast
-
isFuture
-
isFuture
-
isBetween
public static boolean isBetween(LocalDateTime dateToCheck, LocalDateTime startDate, LocalDateTime endDate)
-