RelativeDateTimeFormatter.RelativeUnit


public static final enum RelativeDateTimeFormatter.RelativeUnit
extends Enum<RelativeDateTimeFormatter.RelativeUnit>

java.lang.Object
   ↳ java.lang.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

RelativeDateTimeFormatter.RelativeUnit  DAYS

Days 

RelativeDateTimeFormatter.RelativeUnit  HOURS

Hours 

RelativeDateTimeFormatter.RelativeUnit  MINUTES

Minutes 

RelativeDateTimeFormatter.RelativeUnit  MONTHS

Months 

RelativeDateTimeFormatter.RelativeUnit  SECONDS

Seconds 

RelativeDateTimeFormatter.RelativeUnit  WEEKS

Weeks 

RelativeDateTimeFormatter.RelativeUnit  YEARS

Years 

Public methods

static RelativeDateTimeFormatter.RelativeUnit valueOf(String name)
static final RelativeUnit[] values()

Inherited methods

Enum values

DAYS

Added in API level 24
public static final RelativeDateTimeFormatter.RelativeUnit DAYS

Days

HOURS

Added in API level 24
public static final RelativeDateTimeFormatter.RelativeUnit HOURS

Hours

MINUTES

Added in API level 24
public static final RelativeDateTimeFormatter.RelativeUnit MINUTES

Minutes

MONTHS

Added in API level 24
public static final RelativeDateTimeFormatter.RelativeUnit MONTHS

Months

SECONDS

Added in API level 24
public static final RelativeDateTimeFormatter.RelativeUnit SECONDS

Seconds

WEEKS

Added in API level 24
public static final RelativeDateTimeFormatter.RelativeUnit WEEKS

Weeks

YEARS

Added in API level 24
public static final RelativeDateTimeFormatter.RelativeUnit YEARS

Years

Public methods

valueOf

public static RelativeDateTimeFormatter.RelativeUnit valueOf (String name)

Parameters
name String

Returns
RelativeDateTimeFormatter.RelativeUnit

values

public static final RelativeUnit[] values ()

Returns
RelativeUnit[]