| java.lang.Object | |||
| ↳ | java.text.AttributedCharacterIterator.Attribute | ||
| ↳ | java.text.Format.Field | ||
| ↳ | java.text.DateFormat.Field | ||
The instances of this inner class are used as attribute keys and values in AttributedCharacterIterator that SimpleDateFormat.formatToCharacterIterator() method returns.
There is no public constructor to this class, the only instances are the constants defined here.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DateFormat.Field | AM_PM | Marks the time indicator part of a date. | |||||||||
| DateFormat.Field | DAY_OF_MONTH | Marks the day of the month part of a date. | |||||||||
| DateFormat.Field | DAY_OF_WEEK | Marks the day of the week part of a date. | |||||||||
| DateFormat.Field | DAY_OF_WEEK_IN_MONTH | Marks the day of the week in the month part of a date. | |||||||||
| DateFormat.Field | DAY_OF_YEAR | Marks the day of the year part of a date. | |||||||||
| DateFormat.Field | ERA | Marks the era part of a date. | |||||||||
| DateFormat.Field | HOUR0 | Marks the hour part of a date (0-11). | |||||||||
| DateFormat.Field | HOUR1 | Marks the hour part of a date (1-12). | |||||||||
| DateFormat.Field | HOUR_OF_DAY0 | Marks the hour of the day part of a date (0-11). | |||||||||
| DateFormat.Field | HOUR_OF_DAY1 | Marks the hour of the day part of a date (1-12). | |||||||||
| DateFormat.Field | MILLISECOND | Marks the millisecond part of a time. | |||||||||
| DateFormat.Field | MINUTE | Marks the minute part of a time. | |||||||||
| DateFormat.Field | MONTH | Marks the month part of a date. | |||||||||
| DateFormat.Field | SECOND | Marks the second part of a time. | |||||||||
| DateFormat.Field | TIME_ZONE | Marks the time zone part of a date. | |||||||||
| DateFormat.Field | WEEK_OF_MONTH | Marks the week of the month part of a date. | |||||||||
| DateFormat.Field | WEEK_OF_YEAR | Marks the week of the year part of a date. | |||||||||
| DateFormat.Field | YEAR | Marks the year part of a date. | |||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.text.AttributedCharacterIterator.Attribute
| |||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of DateFormat.Field with the given
fieldName and calendar field.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns the Calendar field this Field represents
| |||||||||||
Returns the DateFormat.Field instance for the given calendar field
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Serialization method resolve instances to the constant
DateFormat.Field values
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.text.AttributedCharacterIterator.Attribute
| |||||||||||
From class java.lang.Object
| |||||||||||
Marks the time indicator part of a date.
Marks the day of the month part of a date.
Marks the day of the week part of a date.
Marks the day of the week in the month part of a date.
Marks the day of the year part of a date.
Marks the era part of a date.
Marks the hour part of a date (0-11).
Marks the hour part of a date (1-12).
Marks the hour of the day part of a date (0-11).
Marks the hour of the day part of a date (1-12).
Marks the millisecond part of a time.
Marks the minute part of a time.
Marks the month part of a date.
Marks the second part of a time.
Marks the time zone part of a date.
Marks the week of the month part of a date.
Marks the week of the year part of a date.
Marks the year part of a date.
Constructs a new instance of DateFormat.Field with the given fieldName and calendar field.
| fieldName | The field name. |
|---|---|
| calendarField | the calender field type of the field. |
Returns the Calendar field this Field represents
Returns the DateFormat.Field instance for the given calendar field
| calendarField | a calendar field constant |
|---|
Serialization method resolve instances to the constant DateFormat.Field values
| InvalidObjectException |
|---|