Class TemporalObjects
- Object
-
- org.thymeleaf.extras.java8time.util.TemporalObjects
-
public final class TemporalObjects extends Object
Utilities for the creation of Java 8 Time objects.- Since:
- 2.1.1
- Author:
- José Miguel Samper
-
-
Constructor Summary
Constructors Constructor Description TemporalObjects()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DateTimeFormatterformatterFor(Object target, Locale locale)static TemporalAccessortemporal(Object target)static ChronoZonedDateTimezonedTime(Object target, ZoneId defaultZoneId)Creates a Temporal object filling the missing fields of the provided time with default values.
-
-
-
Method Detail
-
formatterFor
public static DateTimeFormatter formatterFor(Object target, Locale locale)
-
zonedTime
public static ChronoZonedDateTime zonedTime(Object target, 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 TemporalAccessor temporal(Object target)
-
-