Date field types
A date,time or datetime field type stores its value as a specific LocalDate
, LocalTime
or LocalDateTime
java type.
It is usually visualized as a textbox with a date and/or time picker.
The following date and time types are available:
Type | Java type | Remarks |
---|---|---|
|
|
A date without a time fragment, eg. 20-May-2018. |
|
|
Time fragment only, eg. 15:06. |
|
|
A date with a time fragment, eg. 20-May-2018 15:06. |
Example date field
document-definition:
name: person
content:
- id: name
type: string
- id: birthdate
type: date
Example time field
document-definition:
name: employee
content:
- id: name
type: string
- id: starts-working-at
type: time
- id: stops-working-at
type: time
Example datetime field
document-definition:
name: review
content:
- id: name
type: string
- id: reviewed-at
type: datetime
A date, time, and datetime type can also be used as storage type for an enumeration.