org.thymeleaf.extras.java8time.expression

## Class Temporals

- Object
- - org.thymeleaf.extras.java8time.expression.Temporals

-     public final class Temporals
      extends Object

  Utility class to performJava 8 dates (`Temporal`) operations.

  An object of this class is usually available in variable evaluation expressions with the name `#temporals`.

  Since:
    2.1.0
  Author:
    José Miguel Samper

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Temporals(Locale locale)`
    `Temporals(Locale locale, ZoneId defaultZoneId)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Integer[]` | `arrayDay(Object[] target)`
    `Integer[]` | `arrayDayOfWeek(Object[] target)`
    `String[]` | `arrayDayOfWeekName(Object[] target)`
    `String[]` | `arrayDayOfWeekNameShort(Object[] target)`
    `String[]` | `arrayFormat(Object[] target)`
    `String[]` | `arrayFormat(Object[] target, Locale locale)`
    `String[]` | `arrayFormat(Object[] target, String pattern)`
    `String[]` | `arrayFormat(Object[] target, String pattern, Locale locale)`
    `String[]` | `arrayFormatISO(Object[] target)`
    `Integer[]` | `arrayHour(Object[] target)`
    `Integer[]` | `arrayMinute(Object[] target)`
    `Integer[]` | `arrayMonth(Object[] target)`
    `String[]` | `arrayMonthName(Object[] target)`
    `String[]` | `arrayMonthNameShort(Object[] target)`
    `Integer[]` | `arrayNanosecond(Object[] target)`
    `Integer[]` | `arraySecond(Object[] target)`
    `Integer[]` | `arrayYear(Object[] target)`
    `Temporal` | `create(Object year, Object month, Object day)`
    `Temporal` | `create(Object year, Object month, Object day, Object hour, Object minute)`
    `Temporal` | `create(Object year, Object month, Object day, Object hour, Object minute, Object second)`
    `Temporal` | `create(Object year, Object month, Object day, Object hour, Object minute, Object second, Object nanosecond)`
    `Temporal` | `createDate(String isoDate)`
    `Temporal` | `createDate(String isoDate, String pattern)`
    `Temporal` | `createDateTime(String isoDate)`
    `Temporal` | `createDateTime(String isoDate, String pattern)`
    `Temporal` | `createNow()`
    `Temporal` | `createNowForTimeZone(Object zoneId)`
    `Temporal` | `createToday()`
    `Temporal` | `createTodayForTimeZone(Object zoneId)`
    `Integer` | `day(Temporal target)`
    `Integer` | `dayOfWeek(Temporal target)`
    `String` | `dayOfWeekName(Temporal target)`
    `String` | `dayOfWeekNameShort(Temporal target)`
    `String` | `format(Temporal target)`
    `String` | `format(Temporal target, Locale locale)`
    `String` | `format(Temporal target, String pattern)`
    `String` | `format(Temporal target, String pattern, Locale locale)`
    `String` | `formatISO(Temporal target)`
    `Integer` | `hour(Temporal target)`
    `List<Integer>` | `listDay(List<? extends Temporal> target)`
    `List<Integer>` | `listDayOfWeek(List<? extends Temporal> target)`
    `List<String>` | `listDayOfWeekName(List<? extends Temporal> target)`
    `List<String>` | `listDayOfWeekNameShort(List<? extends Temporal> target)`
    `List<String>` | `listFormat(List<? extends Temporal> target)`
    `List<String>` | `listFormat(List<? extends Temporal> target, Locale locale)`
    `List<String>` | `listFormat(List<? extends Temporal> target, String pattern)`
    `List<String>` | `listFormat(List<? extends Temporal> target, String pattern, Locale locale)`
    `List<String>` | `listFormatISO(List<? extends Temporal> target)`
    `List<Integer>` | `listHour(List<? extends Temporal> target)`
    `List<Integer>` | `listMinute(List<? extends Temporal> target)`
    `List<Integer>` | `listMonth(List<? extends Temporal> target)`
    `List<String>` | `listMonthName(List<? extends Temporal> target)`
    `List<String>` | `listMonthNameShort(List<? extends Temporal> target)`
    `List<Integer>` | `listNanosecond(List<? extends Temporal> target)`
    `List<Integer>` | `listSecond(List<? extends Temporal> target)`
    `List<Integer>` | `listYear(List<? extends Temporal> target)`
    `Integer` | `minute(Temporal target)`
    `Integer` | `month(Temporal target)`
    `String` | `monthName(Temporal target)`
    `String` | `monthNameShort(Temporal target)`
    `Integer` | `nanosecond(Temporal target)`
    `Integer` | `second(Temporal target)`
    `Set<Integer>` | `setDay(Set<? extends Temporal> target)`
    `Set<Integer>` | `setDayOfWeek(Set<? extends Temporal> target)`
    `Set<String>` | `setDayOfWeekName(Set<? extends Temporal> target)`
    `Set<String>` | `setDayOfWeekNameShort(Set<? extends Temporal> target)`
    `Set<String>` | `setFormat(Set<? extends Temporal> target)`
    `Set<String>` | `setFormat(Set<? extends Temporal> target, Locale locale)`
    `Set<String>` | `setFormat(Set<? extends Temporal> target, String pattern)`
    `Set<String>` | `setFormat(Set<? extends Temporal> target, String pattern, Locale locale)`
    `Set<String>` | `setFormatISO(Set<? extends Temporal> target)`
    `Set<Integer>` | `setHour(Set<? extends Temporal> target)`
    `Set<Integer>` | `setMinute(Set<? extends Temporal> target)`
    `Set<Integer>` | `setMonth(Set<? extends Temporal> target)`
    `Set<String>` | `setMonthName(Set<? extends Temporal> target)`
    `Set<String>` | `setMonthNameShort(Set<? extends Temporal> target)`
    `Set<Integer>` | `setNanosecond(Set<? extends Temporal> target)`
    `Set<Integer>` | `setSecond(Set<? extends Temporal> target)`
    `Set<Integer>` | `setYear(Set<? extends Temporal> target)`
    `Integer` | `year(Temporal target)`

    - ### Methods inherited from class Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Temporals

          public Temporals(Locale locale)

    - #### Temporals

          public Temporals(Locale locale,
                           ZoneId defaultZoneId)

  - ### Method Detail

    - #### create

          public Temporal create(Object year,
                                 Object month,
                                 Object day)

      Returns:
        a instance of java.time.LocalDate
      Since:
        2.1.0

    - #### create

          public Temporal create(Object year,
                                 Object month,
                                 Object day,
                                 Object hour,
                                 Object minute)

      Returns:
        a instance of java.time.LocalDateTime
      Since:
        2.1.0

    - #### create

          public Temporal create(Object year,
                                 Object month,
                                 Object day,
                                 Object hour,
                                 Object minute,
                                 Object second)

      Returns:
        a instance of java.time.LocalDateTime
      Since:
        2.1.0

    - #### create

          public Temporal create(Object year,
                                 Object month,
                                 Object day,
                                 Object hour,
                                 Object minute,
                                 Object second,
                                 Object nanosecond)

      Returns:
        a instance of java.time.LocalDateTime
      Since:
        2.1.0

    - #### createDate

          public Temporal createDate(String isoDate)

      Returns:
        a instance of java.time.LocalDate
      Since:
        2.1.0

    - #### createDateTime

          public Temporal createDateTime(String isoDate)

      Returns:
        a instance of java.time.LocalDateTime
      Since:
        2.1.0

    - #### createDate

          public Temporal createDate(String isoDate,
                                     String pattern)

      Returns:
        a instance of java.time.LocalDate
      Since:
        2.1.0

    - #### createDateTime

          public Temporal createDateTime(String isoDate,
                                         String pattern)

      Returns:
        a instance of java.time.LocalDateTime
      Since:
        2.1.0

    - #### createNow

          public Temporal createNow()

      Returns:
        a instance of java.time.LocalDateTime
      Since:
        2.1.0

    - #### createNowForTimeZone

          public Temporal createNowForTimeZone(Object zoneId)

      Returns:
        a instance of java.time.ZonedDateTime
      Since:
        2.1.0

    - #### createToday

          public Temporal createToday()

      Returns:
        a instance of java.time.LocalDate
      Since:
        2.1.0

    - #### createTodayForTimeZone

          public Temporal createTodayForTimeZone(Object zoneId)

      Returns:
        a instance of java.time.ZonedDateTime with 00:00:00.000 for the time part
      Since:
        2.1.0

    - #### format

          public String format(Temporal target)

      Since:
        2.1.0

    - #### arrayFormat

          public String[] arrayFormat(Object[] target)

      Since:
        2.1.0

    - #### listFormat

          public List<String> listFormat(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setFormat

          public Set<String> setFormat(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### format

          public String format(Temporal target,
                               Locale locale)

      Since:
        2.1.1

    - #### arrayFormat

          public String[] arrayFormat(Object[] target,
                                      Locale locale)

      Since:
        2.1.1

    - #### listFormat

          public List<String> listFormat(List<? extends Temporal> target,
                                         Locale locale)

      Since:
        2.1.1

    - #### setFormat

          public Set<String> setFormat(Set<? extends Temporal> target,
                                       Locale locale)

      Since:
        2.1.1

    - #### format

          public String format(Temporal target,
                               String pattern)

      Since:
        2.1.0

    - #### arrayFormat

          public String[] arrayFormat(Object[] target,
                                      String pattern)

      Since:
        2.1.0

    - #### listFormat

          public List<String> listFormat(List<? extends Temporal> target,
                                         String pattern)

      Since:
        2.1.0

    - #### setFormat

          public Set<String> setFormat(Set<? extends Temporal> target,
                                       String pattern)

      Since:
        2.1.0

    - #### format

          public String format(Temporal target,
                               String pattern,
                               Locale locale)

      Since:
        2.1.1

    - #### arrayFormat

          public String[] arrayFormat(Object[] target,
                                      String pattern,
                                      Locale locale)

      Since:
        2.1.1

    - #### listFormat

          public List<String> listFormat(List<? extends Temporal> target,
                                         String pattern,
                                         Locale locale)

      Since:
        2.1.1

    - #### setFormat

          public Set<String> setFormat(Set<? extends Temporal> target,
                                       String pattern,
                                       Locale locale)

      Since:
        2.1.1

    - #### day

          public Integer day(Temporal target)

      Since:
        2.1.0

    - #### arrayDay

          public Integer[] arrayDay(Object[] target)

      Since:
        2.1.0

    - #### listDay

          public List<Integer> listDay(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setDay

          public Set<Integer> setDay(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### month

          public Integer month(Temporal target)

      Since:
        2.1.0

    - #### arrayMonth

          public Integer[] arrayMonth(Object[] target)

      Since:
        2.1.0

    - #### listMonth

          public List<Integer> listMonth(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setMonth

          public Set<Integer> setMonth(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### monthName

          public String monthName(Temporal target)

      Since:
        2.1.0

    - #### arrayMonthName

          public String[] arrayMonthName(Object[] target)

      Since:
        2.1.0

    - #### listMonthName

          public List<String> listMonthName(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setMonthName

          public Set<String> setMonthName(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### monthNameShort

          public String monthNameShort(Temporal target)

      Since:
        2.1.0

    - #### arrayMonthNameShort

          public String[] arrayMonthNameShort(Object[] target)

      Since:
        2.1.0

    - #### listMonthNameShort

          public List<String> listMonthNameShort(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setMonthNameShort

          public Set<String> setMonthNameShort(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### year

          public Integer year(Temporal target)

      Since:
        2.1.0

    - #### arrayYear

          public Integer[] arrayYear(Object[] target)

      Since:
        2.1.0

    - #### listYear

          public List<Integer> listYear(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setYear

          public Set<Integer> setYear(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### dayOfWeek

          public Integer dayOfWeek(Temporal target)

      Since:
        2.1.0

    - #### arrayDayOfWeek

          public Integer[] arrayDayOfWeek(Object[] target)

      Since:
        2.1.0

    - #### listDayOfWeek

          public List<Integer> listDayOfWeek(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setDayOfWeek

          public Set<Integer> setDayOfWeek(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### dayOfWeekName

          public String dayOfWeekName(Temporal target)

      Since:
        2.1.0

    - #### arrayDayOfWeekName

          public String[] arrayDayOfWeekName(Object[] target)

      Since:
        2.1.0

    - #### listDayOfWeekName

          public List<String> listDayOfWeekName(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setDayOfWeekName

          public Set<String> setDayOfWeekName(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### dayOfWeekNameShort

          public String dayOfWeekNameShort(Temporal target)

      Since:
        2.1.0

    - #### arrayDayOfWeekNameShort

          public String[] arrayDayOfWeekNameShort(Object[] target)

      Since:
        2.1.0

    - #### listDayOfWeekNameShort

          public List<String> listDayOfWeekNameShort(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setDayOfWeekNameShort

          public Set<String> setDayOfWeekNameShort(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### hour

          public Integer hour(Temporal target)

      Since:
        2.1.0

    - #### arrayHour

          public Integer[] arrayHour(Object[] target)

      Since:
        2.1.0

    - #### listHour

          public List<Integer> listHour(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setHour

          public Set<Integer> setHour(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### minute

          public Integer minute(Temporal target)

      Since:
        2.1.0

    - #### arrayMinute

          public Integer[] arrayMinute(Object[] target)

      Since:
        2.1.0

    - #### listMinute

          public List<Integer> listMinute(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setMinute

          public Set<Integer> setMinute(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### second

          public Integer second(Temporal target)

      Since:
        2.1.0

    - #### arraySecond

          public Integer[] arraySecond(Object[] target)

      Since:
        2.1.0

    - #### listSecond

          public List<Integer> listSecond(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setSecond

          public Set<Integer> setSecond(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### nanosecond

          public Integer nanosecond(Temporal target)

      Since:
        2.1.0

    - #### arrayNanosecond

          public Integer[] arrayNanosecond(Object[] target)

      Since:
        2.1.0

    - #### listNanosecond

          public List<Integer> listNanosecond(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setNanosecond

          public Set<Integer> setNanosecond(Set<? extends Temporal> target)

      Since:
        2.1.0

    - #### formatISO

          public String formatISO(Temporal target)

      Since:
        2.1.0

    - #### arrayFormatISO

          public String[] arrayFormatISO(Object[] target)

      Since:
        2.1.0

    - #### listFormatISO

          public List<String> listFormatISO(List<? extends Temporal> target)

      Since:
        2.1.0

    - #### setFormatISO

          public Set<String> setFormatISO(Set<? extends Temporal> target)

      Since:
        2.1.0

Copyright © 2016 The THYMELEAF team. All rights reserved.