Class DateTimeFormatters
java.lang.Object
org.springframework.boot.autoconfigure.web.format.DateTimeFormatters
Formatters for dates, times, and date-times.- Since:
- 2.3.0
- Author:
- Andy Wilkinson, Gaurav Pareek
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondateFormat(@Nullable String pattern) Configures the date format using the givenpattern.dateTimeFormat(@Nullable String pattern) Configures the date-time format using the givenpattern.timeFormat(@Nullable String pattern) Configures the time format using the givenpattern.
-
Constructor Details
-
DateTimeFormatters
public DateTimeFormatters()
-
-
Method Details
-
dateFormat
Configures the date format using the givenpattern.- Parameters:
pattern- the pattern for formatting dates- Returns:
thisfor chained method invocation
-
timeFormat
Configures the time format using the givenpattern.- Parameters:
pattern- the pattern for formatting times- Returns:
thisfor chained method invocation
-
dateTimeFormat
Configures the date-time format using the givenpattern.- Parameters:
pattern- the pattern for formatting date-times- Returns:
thisfor chained method invocation
-