Package org.thymeleaf.util.temporal
Class TemporalObjects
- java.lang.Object
-
- org.thymeleaf.util.temporal.TemporalObjects
-
public final class TemporalObjects extends java.lang.ObjectUtilities for the creation of Java 8 Time objects.- Since:
- 3.1.0
-
-
Constructor Summary
Constructors Constructor Description TemporalObjects()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.time.format.DateTimeFormatterformatterFor(java.lang.Object target, java.util.Locale locale)private static booleanshouldDisplayYearBeforeMonth(java.util.Locale locale)static java.time.temporal.TemporalAccessortemporal(java.lang.Object target)private static java.time.format.DateTimeFormatteryearMonthFormatter(java.util.Locale locale)static java.time.chrono.ChronoZonedDateTimezonedTime(java.lang.Object target, java.time.ZoneId defaultZoneId)Creates a Temporal object filling the missing fields of the provided time with default values.
-
-
-
Method Detail
-
formatterFor
public static java.time.format.DateTimeFormatter formatterFor(java.lang.Object target, java.util.Locale locale)
-
zonedTime
public static java.time.chrono.ChronoZonedDateTime zonedTime(java.lang.Object target, java.time.ZoneId defaultZoneId)Creates a Temporal object filling the missing fields of the provided time with default values.- Parameters:
target- the temporal object to be converteddefaultZoneId- the default value for ZoneId- Returns:
- a Temporal object
-
temporal
public static java.time.temporal.TemporalAccessor temporal(java.lang.Object target)
-
yearMonthFormatter
private static java.time.format.DateTimeFormatter yearMonthFormatter(java.util.Locale locale)
-
shouldDisplayYearBeforeMonth
private static boolean shouldDisplayYearBeforeMonth(java.util.Locale locale)
-
-