Field
open class Field : Format.Field
kotlin.Any | |||
↳ | java.text.AttributedCharacterIterator.Attribute | ||
↳ | java.text.Format.Field | ||
↳ | android.icu.text.DateFormat.Field |
The instances of this inner class are used as attribute keys and values in AttributedCharacterIterator that DateFormat.formatToCharacterIterator() method returns.
There is no public constructor to this class, the only instances are the constants defined here.
Summary
Protected constructors | |
---|---|
Constructs a |
Public methods | |
---|---|
open Int |
Returns the |
open static DateFormat.Field! |
ofCalendarField(calendarField: Int) Returns the |
Protected methods | |
---|---|
open Any! |
Resolves instances being deserialized to the predefined constants. |
Properties | |
---|---|
static DateFormat.Field! |
Constant identifying the time of day indicator(am/pm). |
static DateFormat.Field! |
[icu] Constant identifying the am/pm/midnight/noon field. |
static DateFormat.Field! |
Constant identifying the day of month field. |
static DateFormat.Field! |
Constant identifying the day of week field. |
static DateFormat.Field! |
Constant identifying the day of week in month field. |
static DateFormat.Field! |
Constant identifying the day of year field. |
static DateFormat.Field! |
Constant identifying the local day of week field. |
static DateFormat.Field! |
Constant identifying the era field. |
static DateFormat.Field! |
Constant identifying the extended year field. |
static DateFormat.Field! |
[icu] Constant identifying the flexible day period field. |
static DateFormat.Field! |
Constant identifying the hour(0-11) field. |
static DateFormat.Field! |
Constant identifying the hour(1-12) field. |
static DateFormat.Field! |
Constant identifying the hour(0-23) of day field. |
static DateFormat.Field! |
Constant identifying the hour(1-24) of day field. |
static DateFormat.Field! |
Constant identifying the Julian day field. |
static DateFormat.Field! |
Constant identifying the millisecond field. |
static DateFormat.Field! |
Constant identifying the milliseconds in day field. |
static DateFormat.Field! |
Constant identifying the minute field. |
static DateFormat.Field! |
Constant identifying the month field. |
static DateFormat.Field! |
Constant identifying the quarter field. |
static DateFormat.Field! |
Constant identifying the second field. |
static DateFormat.Field! |
Constant identifying the time zone field. |
static DateFormat.Field! |
Constant identifying the week of month field. |
static DateFormat.Field! |
Constant identifying the week of year field. |
static DateFormat.Field! |
Constant identifying the year field. |
static DateFormat.Field! |
Constant identifying the year used with week of year field. |
Protected constructors
Field
protected Field(
name: String!,
calendarField: Int)
Constructs a DateFormat.Field
with the given name and the Calendar
field which this attribute represents. Use -1 for calendarField
if this field does not have a corresponding Calendar
field.
Parameters | |
---|---|
name |
String!: Name of the attribute |
calendarField |
Int: Calendar field constant |
Public methods
getCalendarField
open fun getCalendarField(): Int
Returns the Calendar
field associated with this attribute. If there is no corresponding Calendar
available, this will return -1.
Return | |
---|---|
Int |
Calendar constant for this attribute. |
ofCalendarField
open static fun ofCalendarField(calendarField: Int): DateFormat.Field!
Returns the Field
constant that corresponds to the Calendar
field calendarField
. If there is no corresponding Field
is available, null is returned.
Parameters | |
---|---|
calendarField |
Int: Calendar field constant |
Return | |
---|---|
DateFormat.Field! |
Field associated with the calendarField , or null if no associated Field is available. |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if calendarField is not a valid Calendar field constant. |
Protected methods
readResolve
protected open fun readResolve(): Any!
Resolves instances being deserialized to the predefined constants.
Return | |
---|---|
Any! |
the resolved Attribute object |
Exceptions | |
---|---|
java.io.InvalidObjectException |
if the constant could not be resolved. |
Properties
AM_PM
static val AM_PM: DateFormat.Field!
Constant identifying the time of day indicator(am/pm).
AM_PM_MIDNIGHT_NOON
static val AM_PM_MIDNIGHT_NOON: DateFormat.Field!
[icu] Constant identifying the am/pm/midnight/noon field.
DAY_OF_MONTH
static val DAY_OF_MONTH: DateFormat.Field!
Constant identifying the day of month field.
DAY_OF_WEEK
static val DAY_OF_WEEK: DateFormat.Field!
Constant identifying the day of week field.
DAY_OF_WEEK_IN_MONTH
static val DAY_OF_WEEK_IN_MONTH: DateFormat.Field!
Constant identifying the day of week in month field.
DAY_OF_YEAR
static val DAY_OF_YEAR: DateFormat.Field!
Constant identifying the day of year field.
DOW_LOCAL
static val DOW_LOCAL: DateFormat.Field!
Constant identifying the local day of week field.
EXTENDED_YEAR
static val EXTENDED_YEAR: DateFormat.Field!
Constant identifying the extended year field.
FLEXIBLE_DAY_PERIOD
static val FLEXIBLE_DAY_PERIOD: DateFormat.Field!
[icu] Constant identifying the flexible day period field.
HOUR0
static val HOUR0: DateFormat.Field!
Constant identifying the hour(0-11) field.
HOUR1
static val HOUR1: DateFormat.Field!
Constant identifying the hour(1-12) field.
HOUR_OF_DAY0
static val HOUR_OF_DAY0: DateFormat.Field!
Constant identifying the hour(0-23) of day field.
HOUR_OF_DAY1
static val HOUR_OF_DAY1: DateFormat.Field!
Constant identifying the hour(1-24) of day field.
JULIAN_DAY
static val JULIAN_DAY: DateFormat.Field!
Constant identifying the Julian day field.
MILLISECOND
static val MILLISECOND: DateFormat.Field!
Constant identifying the millisecond field.
MILLISECONDS_IN_DAY
static val MILLISECONDS_IN_DAY: DateFormat.Field!
Constant identifying the milliseconds in day field.
MINUTE
static val MINUTE: DateFormat.Field!
Constant identifying the minute field.
MONTH
static val MONTH: DateFormat.Field!
Constant identifying the month field.
QUARTER
static val QUARTER: DateFormat.Field!
Constant identifying the quarter field.
SECOND
static val SECOND: DateFormat.Field!
Constant identifying the second field.
TIME_ZONE
static val TIME_ZONE: DateFormat.Field!
Constant identifying the time zone field.
WEEK_OF_MONTH
static val WEEK_OF_MONTH: DateFormat.Field!
Constant identifying the week of month field.
WEEK_OF_YEAR
static val WEEK_OF_YEAR: DateFormat.Field!
Constant identifying the week of year field.
YEAR_WOY
static val YEAR_WOY: DateFormat.Field!
Constant identifying the year used with week of year field.