lightbulb_outline Please take our October 2018 developer survey. Start survey

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

added in API level 24
public static RelativeDateTimeFormatter.RelativeUnit valueOf (String name)

Parameters
name String

Returns
RelativeDateTimeFormatter.RelativeUnit

values

added in API level 24
public static final RelativeUnit[] values ()

Returns
RelativeUnit[]