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
-
Method Summary
Modifier and TypeMethodDescriptiondateFormat
(String pattern) Configures the date format using the givenpattern
.dateTimeFormat
(String pattern) Configures the date-time format using the givenpattern
.timeFormat
(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:
this
for chained method invocation
-
timeFormat
Configures the time format using the givenpattern
.- Parameters:
pattern
- the pattern for formatting times- Returns:
this
for chained method invocation
-
dateTimeFormat
Configures the date-time format using the givenpattern
.- Parameters:
pattern
- the pattern for formatting date-times- Returns:
this
for chained method invocation
-