public final class DateTimeTools extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ILLEGAL_ZONE_ID_MSG |
static String |
METHOD_AFTER |
static String |
METHOD_AS_ZONE_DATETIME |
static String |
METHOD_BEFORE |
static String |
METHOD_DAYS |
static String |
METHOD_EQUALS |
static String |
METHOD_FORMAT |
static String |
METHOD_MONTHS |
static String |
METHOD_NANO |
static String |
METHOD_SECONDS |
static String |
METHOD_UNKNOWN_MSG |
static String |
METHOD_YEARS |
| Modifier and Type | Method and Description |
|---|---|
static DateTimeFormatter |
createDateTimeFormatter(List list,
int index,
DateTimeFormatter defaultFormatter)
Create a DateTimeFormatter from a pattern found in a List on a given index.
|
static DateTimeFormatter |
createDateTimeFormatter(List list,
int index,
String defaultPattern)
Create a DateTimeFormatter from a pattern found in a List on a given index.
|
static Optional<ZoneId> |
zoneIdLookup(List list,
int index)
Look up a ZoneId based on a String in a list on a given index.
|
public static final String METHOD_EQUALS
public static final String METHOD_BEFORE
public static final String METHOD_AFTER
public static final String METHOD_FORMAT
public static final String METHOD_DAYS
public static final String METHOD_MONTHS
public static final String METHOD_YEARS
public static final String METHOD_NANO
public static final String METHOD_SECONDS
public static final String METHOD_AS_ZONE_DATETIME
public static final String METHOD_UNKNOWN_MSG
public static final String ILLEGAL_ZONE_ID_MSG
public static DateTimeFormatter createDateTimeFormatter(List list, int index, DateTimeFormatter defaultFormatter)
list - A list of Strings containing the patternindex - The index on where in the list the pattern is located.defaultFormatter - A default formatter to be returned if the given list size is lower than the given index.public static DateTimeFormatter createDateTimeFormatter(List list, int index, String defaultPattern)
list - A list of Strings containing the patternindex - The index on where in the list the pattern is located.defaultPattern - The pattern to be used for the formatter if the list size is lower than the given index.public static Optional<ZoneId> zoneIdLookup(List list, int index) throws freemarker.template.TemplateModelException
list - A list of Strings containing the String representation of the ZoneId.index - The index on where in the list the ZoneId string is located.Optional will be returned.freemarker.template.TemplateModelException - If Illegal ZoneId string was found in the list.Copyright © 2022. All rights reserved.