DateTimeField

A field describing a property of a date, time, or measurement of time.

These are intended to be used primarily during parsing and formatting. Each date-time primitive is capable of resolving or supplying the set of fields that are applicable to it.

enum DateTimeField : Enum<DateTimeField>

Entries

YEAR
Link copied to clipboard
common

The proleptic year.

In the ISO calendar system, positive values indicate years in the current era, a value of 0 is equivalent to 1 BCE, -1 to 2 BCE, and so forth.

YEAR_OF_ERA
Link copied to clipboard
common

The year of the era.

ERA
Link copied to clipboard
common

The era.

In the ISO calendar system, this will be 0 (BCE) or 1 (CE).

ERA()
MONTH_OF_YEAR
Link copied to clipboard
common

The month of the year, such as January

In the ISO calendar system, this will be from 1 (January) to 12 (December).

DAY_OF_YEAR
Link copied to clipboard
common

The day of the year.

In the ISO calendar system, this will be from 1-366.

DAY_OF_MONTH
Link copied to clipboard
common

The day of the month.

In the ISO calendar system, this will be from 1-31.

DAY_OF_WEEK
Link copied to clipboard
common

The day of the week, such as Sunday.

In the ISO calendar system, this will be from 1 (Monday) to 7 (Sunday).

AM_PM_OF_DAY
Link copied to clipboard
common

AM or PM of the day.

0 (AM) or 1 (PM).

HOUR_OF_DAY
Link copied to clipboard
common

The hour of the day, from 0 to 23.

MINUTE_OF_HOUR
Link copied to clipboard
common

The minute of the hour, from 0 to 59.

SECOND_OF_MINUTE
Link copied to clipboard
common

The second of the minute, from 0 to 59.

NANOSECOND_OF_SECOND
Link copied to clipboard
common

The nanosecond of the second, from 0 to 999,999,999.

MILLISECOND_OF_SECOND
Link copied to clipboard
common

The millisecond of the second, from 0 to 999.

UTC_OFFSET_SIGN
Link copied to clipboard
common

The sign of the UTC offset, -1 (negative) or 1 (positive).

UTC_OFFSET_HOURS
Link copied to clipboard
common

The hour component of the UTC offset, from 0-18.

UTC_OFFSET_MINUTES
Link copied to clipboard
common

The minute component of the UTC offset, from 0-59.

UTC_OFFSET_SECONDS
Link copied to clipboard
common

The second component of the UTC offset, from 0-59.

UTC_OFFSET_TOTAL_SECONDS
Link copied to clipboard
common

The total number of seconds in the UTC offset, from (-18 * 60 * 60) to (18 * 60 * 60).

PERIOD_SIGN
Link copied to clipboard
common

The sign of the period, -1 (negative) or 1 (positive).

PERIOD_OF_YEARS
Link copied to clipboard
common

A period of years.

PERIOD_OF_MONTHS
Link copied to clipboard
common

A period of months.

PERIOD_OF_WEEKS
Link copied to clipboard
common

A period of weeks.

PERIOD_OF_DAYS
Link copied to clipboard
common

A period of days.

DURATION_OF_HOURS
Link copied to clipboard
common

A duration of hours.

DURATION_OF_MINUTES
Link copied to clipboard
common

A duration of minutes.

DURATION_OF_SECONDS
Link copied to clipboard
common

A duration of seconds.

IS_UNBOUNDED
Link copied to clipboard
common

Indicates the presence of the minimum or maximum sentinel value, which should treated as unbounded (in ISO-8601 parlance, "open") in the context of an interval.

-1 (true) or 0 (false).

Functions

compareTo
Link copied to clipboard
common
operator override fun compareTo(other: DateTimeField): Int
equals
Link copied to clipboard
common
operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

name
Link copied to clipboard
common
override val name: String
ordinal
Link copied to clipboard
common
override val ordinal: Int