Home Reference Source
import {TemporalField} from 'js-joda/src/temporal/TemporalField.js'
public interface | source

TemporalField

Direct Subclass:

ChronoField, src/temporal/IsoFields.js~Field

Indirect Subclass:

src/temporal/IsoFields.js~DAY_OF_QUARTER_FIELD, src/temporal/IsoFields.js~QUARTER_OF_YEAR_FIELD, src/temporal/IsoFields.js~WEEK_BASED_YEAR_FIELD, src/temporal/IsoFields.js~WEEK_OF_WEEK_BASED_YEAR_FIELD

A field of date-time, such as month-of-year or hour-of-minute.

Date and time is expressed using fields which partition the time-line into something meaningful for humans. Implementations of this interface represent those fields.

The most commonly used units are defined in ChronoField. Further fields are supplied in IsoFields, WeekFields and JulianFields. Fields can also be written by application code by implementing this interface.

The field works using double dispatch. Client code calls methods on a date-time like LocalDateTime which check if the field is a ChronoField. If it is, then the date-time must handle it. Otherwise, the method call is re-dispatched to the matching method in this interface.