Top Description Constructors Methods
org.springframework.format.datetime.standard

pack-priv Class MonthFormatter

extends Object
implements Formatter<Month>
Class Inheritance
All Implemented Interfaces
org.springframework.format.Formatter, org.springframework.format.Parser, org.springframework.format.Printer
Imports
java.text.ParseException, java.time.Month, java.util.Locale, org.springframework.format.Formatter

Formatter implementation for a JSR-310 Month, resolving a given String against the Month enum values (ignoring case).
Author
Juergen Hoeller
Since
5.0.4
See Also
Month#valueOf

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Month
parse(String
the text string
text
,
Locale
the current user locale
locale
)

Implements org.springframework.format.Parser.parse.

Parse a text String to produce a T.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MonthFormatterback to summary
pack-priv MonthFormatter()

Method Detail

parseback to summary
public Month parse(String text, Locale locale) throws ParseException

Implements org.springframework.format.Parser.parse.

Doc from org.springframework.format.Parser.parse.

Parse a text String to produce a T.

Parameters
text:String

the text string

locale:Locale

the current user locale

Returns:Month

an instance of T

Annotations
@Override
Exceptions
ParseException:
when a parse exception occurs in a java.text parsing library