public class PickerUtilities extends Object
Constructor and Description |
---|
PickerUtilities() |
Modifier and Type | Method and Description |
---|---|
static DateTimeFormatter |
createFormatterFromPatternString(String formatPattern,
Locale locale)
createFormatterFromPatternString, This creates a DateTimeFormatter from the supplied pattern
string and supplied locale.
|
static boolean |
isLocalTimeInRange(LocalTime value,
LocalTime optionalMinimum,
LocalTime optionalMaximum,
boolean inclusiveOfEndpoints)
isLocalTimeInRange, This returns true if the specified value is inside of the specified
range.
|
static boolean |
isSameLocalDate(LocalDate first,
LocalDate second)
isSameLocalDate, This compares two date variables to see if their values are equal.
|
static boolean |
isSameLocalTime(LocalTime first,
LocalTime second) |
static boolean |
isSameYearMonth(YearMonth first,
YearMonth second)
isSameYearMonth, This compares two YearMonth variables to see if their values are equal.
|
static String |
localDateTimeToString(LocalDateTime value)
localDateTimeToString, This will return the supplied LocalDateTime as a string.
|
static String |
localDateTimeToString(LocalDateTime value,
String emptyTimeString)
localDateTimeToString, This will return the supplied LocalDateTime as a string.
|
static String |
localDateToString(LocalDate date)
localDateToString, This returns the supplied date in the ISO-8601 format (uuuu-MM-dd).
|
static String |
localDateToString(LocalDate date,
String emptyDateString)
localDateToString, This returns the supplied date in the ISO-8601 format (uuuu-MM-dd).
|
static String |
localTimeToString(LocalTime time)
localTimeToString, This will return the supplied time as a string.
|
static String |
localTimeToString(LocalTime time,
String emptyTimeString)
localTimeToString, This will return the supplied time as a string.
|
public static DateTimeFormatter createFormatterFromPatternString(String formatPattern, Locale locale)
public static boolean isLocalTimeInRange(LocalTime value, LocalTime optionalMinimum, LocalTime optionalMaximum, boolean inclusiveOfEndpoints)
public static boolean isSameLocalDate(LocalDate first, LocalDate second)
public static boolean isSameYearMonth(YearMonth first, YearMonth second)
public static String localDateTimeToString(LocalDateTime value, String emptyTimeString)
String
, such as 2007-12-03T10:15:30
.
The output will be one of the following ISO-8601 formats:
uuuu-MM-dd'T'HH:mm
uuuu-MM-dd'T'HH:mm:ss
uuuu-MM-dd'T'HH:mm:ss.SSS
uuuu-MM-dd'T'HH:mm:ss.SSSSSS
uuuu-MM-dd'T'HH:mm:ss.SSSSSSSSS
public static String localDateTimeToString(LocalDateTime value)
String
, such as 2007-12-03T10:15:30
.
The output will be one of the following ISO-8601 formats:
uuuu-MM-dd'T'HH:mm
uuuu-MM-dd'T'HH:mm:ss
uuuu-MM-dd'T'HH:mm:ss.SSS
uuuu-MM-dd'T'HH:mm:ss.SSSSSS
uuuu-MM-dd'T'HH:mm:ss.SSSSSSSSS
public static String localDateToString(LocalDate date)
public static String localDateToString(LocalDate date, String emptyDateString)
public static String localTimeToString(LocalTime time)
public static String localTimeToString(LocalTime time, String emptyTimeString)
Copyright © 2021. All rights reserved.