Added in API level 24

RelativeUnit


class RelativeUnit
kotlin.Any
   ↳ kotlin.Enum<android.icu.text.RelativeDateTimeFormatter.RelativeUnit>
   ↳ android.icu.text.RelativeDateTimeFormatter.RelativeUnit

Represents the unit for formatting a relative date. e.g "in 5 days" or "in 3 months"

Summary

Enum values

Days

Hours

Minutes

Months

Seconds

Weeks

Years

Enum values

DAYS

Added in API level 24
enum val DAYS : RelativeDateTimeFormatter.RelativeUnit

Days

HOURS

Added in API level 24
enum val HOURS : RelativeDateTimeFormatter.RelativeUnit

Hours

MINUTES

Added in API level 24
enum val MINUTES : RelativeDateTimeFormatter.RelativeUnit

Minutes

MONTHS

Added in API level 24
enum val MONTHS : RelativeDateTimeFormatter.RelativeUnit

Months

SECONDS

Added in API level 24
enum val SECONDS : RelativeDateTimeFormatter.RelativeUnit

Seconds

WEEKS

Added in API level 24
enum val WEEKS : RelativeDateTimeFormatter.RelativeUnit

Weeks

YEARS

Added in API level 24
enum val YEARS : RelativeDateTimeFormatter.RelativeUnit

Years