java.lang.Object | |
↳ | org.springframework.format.datetime.DateFormatter |
A formatter for java.util.Date types. Allows the configuration of an explicit date pattern and locale.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new default DateFormatter.
| |||||||||||
Create a new DateFormatter for the given date pattern.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parse a text String to produce a T.
| |||||||||||
Specify whether or not parsing is to be lenient.
| |||||||||||
Set the pattern to use to format date values.
| |||||||||||
Set the style to use to format date values.
| |||||||||||
Set the TimeZone to normalize the date values into, if any.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.format.Parser
| |||||||||||
From interface
org.springframework.format.Printer
|
Create a new default DateFormatter.
Parse a text String to produce a T.
text | the text string |
---|---|
locale | the current user locale |
ParseException |
---|
Specify whether or not parsing is to be lenient. Default is false.
With lenient parsing, the parser may allow inputs that do not precisely match the format. With strict parsing, inputs must match the format exactly.
Set the pattern to use to format date values.
If not specified, DateFormat's default style will be used.
Set the TimeZone to normalize the date values into, if any.