public class DateField extends Field
Field.Type| Modifier and Type | Field and Description |
|---|---|
static String |
FORMAT
The date format used by date fields, compatible with SimpleDateFormat.
|
| Constructor and Description |
|---|
DateField(String name)
Creates a new DateField with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
format(Date date)
Converts the given date into a string which follows the format used by
date fields.
|
static Date |
parse(String dateString)
Parses the given string into a corresponding date.
|
getName, getOptions, getType, setName, setOptions, setTypepublic static final String FORMAT
public DateField(String name)
name - The unique name to associate with this field.public static String format(Date date)
date - The date value to format, which may be null.public static Date parse(String dateString) throws ParseException
dateString - The date string to parse, which may be null.ParseException - If the given date string does not conform to the standard format
used by date fields.Copyright © 2015. All rights reserved.