A field type defines the type of the field, such as hourOfDay. If does not directly enable any calculations, however it does provide a {@link #getField(Chronology)} method that returns the actual calculation enginefor a particular chronology. It also provides access to the related {@link DurationFieldType}s.
Instances of DateTimeFieldType
are singletons. They can be compared using ==
.
If required, you can create your own field, for example a quarterOfYear. You must create a subclass of DateTimeFieldType
that defines the field type. This class returns the actual calculation engine from {@link #getField(Chronology)}.
@author Stephen Colebourne
@author Brian S O'Neill
@since 1.0
|
|