Most visited

Recently visited

Added in API level 24

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


表示格式化相对日期的单位。 例如“在5天内”或“在3个月内”

Summary

Enum values

RelativeDateTimeFormatter.RelativeUnit  DAYS

RelativeDateTimeFormatter.RelativeUnit  HOURS

小时

RelativeDateTimeFormatter.RelativeUnit  MINUTES

分钟

RelativeDateTimeFormatter.RelativeUnit  MONTHS

RelativeDateTimeFormatter.RelativeUnit  SECONDS

RelativeDateTimeFormatter.RelativeUnit  WEEKS

RelativeDateTimeFormatter.RelativeUnit  YEARS

年份

Public methods

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

Inherited methods

From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum values

MINUTES

Added in API level 24
RelativeDateTimeFormatter.RelativeUnit MINUTES

分钟

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[]

Hooray!