Dates using a DateFormat object.
| Modifier and Type | Field and Description |
|---|---|
| private final DateFormat |
| Access | Constructor and Description |
|---|---|
| public | DateConverter(DateFormat
the formatter/parser to use formatter)Creates a converter that uses the given date formatter/parser. |
| Modifier and Type | Method and Description |
|---|---|
| public Date | convert(String
the string to convert value)Implements joptsimple. |
| public static DateConverter | Returns: the new converterexpected date/time pattern pattern)Creates a converter that uses a |
| private String | |
| public String | valuePattern()
Implements joptsimple. |
| public Class | valueType()
Implements joptsimple. |
| formatter | back to summary |
|---|---|
| private final DateFormat formatter | |
| DateConverter | back to summary |
|---|---|
| public DateConverter(DateFormat formatter) Creates a converter that uses the given date formatter/parser.
| |
| convert | back to summary |
|---|---|
| public Date convert(String value) Implements joptsimple. Doc from joptsimple. Converts the given string value into a Java type. | |
| datePattern | back to summary |
|---|---|
| public static DateConverter datePattern(String pattern) Creates a converter that uses a
| |
| message | back to summary |
|---|---|
| private String message(String value) | |
| valuePattern | back to summary |
|---|---|
| public String valuePattern() Implements joptsimple. Doc from joptsimple. Gives a string that describes the pattern of the values this converter expects, if any. For example, a date
converter can respond with a
| |
| valueType | back to summary |
|---|---|
| public Class Implements joptsimple. Doc from joptsimple. Gives the class of the type of values this converter converts to. | |