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 |
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
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
Public methods
valueOf
public static RelativeDateTimeFormatter.RelativeUnit valueOf (String name)
Parameters | |
---|---|
name |
String |
Returns | |
---|---|
RelativeDateTimeFormatter.RelativeUnit |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-06-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-18 UTC."],[],[]]