public static enum Parsers.DateParser extends Enum<Parsers.DateParser>
| 枚举常量和说明 |
|---|
INSTANCE |
| 限定符和类型 | 方法和说明 |
|---|---|
Date |
parse(String text)
Will try to parse the date with Locale.US and formats as follows:
yyyy-MM-dd HH:mm:ss.SSS, yyyy-MM-dd HH:mm:ss and yyyy-MM-dd
|
Date |
parse(String text,
String format)
Parse the text with the format specified and Locale.US
|
Date |
parse(String text,
String format,
Locale locale)
Parse the text with the format and locale specified
|
static Parsers.DateParser |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static Parsers.DateParser[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final Parsers.DateParser INSTANCE
public static Parsers.DateParser[] values()
for (Parsers.DateParser c : Parsers.DateParser.values()) System.out.println(c);
public static Parsers.DateParser valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public Date parse(String text) throws ParserException
text - the text to parseParserException - if the text cannot be parsedpublic Date parse(String text, String format) throws ParserException
text - the text to parseformat - the date format, see SimpleDateFormat for more informationParserException - if the text cannot be parsedpublic Date parse(String text, String format, Locale locale) throws ParserException
text - the text to parseformat - the date format, see SimpleDateFormat for more informationlocale - the localeParserException - if the text cannot be parsedCopyright © 2019 Ctrip, Inc.. All rights reserved.