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个月内”
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
|
RelativeDateTimeFormatter.RelativeUnit valueOf (String name)
Parameters | |
---|---|
name |
String
|
Returns | |
---|---|
RelativeDateTimeFormatter.RelativeUnit |