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

MINUTES

added in API level 24
RelativeDateTimeFormatter.RelativeUnit MINUTES

Minutes

SECONDS

added in API level 24
RelativeDateTimeFormatter.RelativeUnit SECONDS

Seconds

Public methods

valueOf

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

Parameters
name String

Returns
RelativeDateTimeFormatter.RelativeUnit

values

added in API level 24
RelativeUnit[] values ()

Returns
RelativeUnit[]