public class RelativeDateFormatterDefault extends Object implements RelativeDateFormatter
| Constructor and Description |
|---|
RelativeDateFormatterDefault(Date date,
LocaleResolver localeResolver) |
RelativeDateFormatterDefault(Instant instant,
LocaleResolver localeResolver) |
| Modifier and Type | Method and Description |
|---|---|
String |
format()
Format!
|
RelativeDateFormatter |
formatType(RelativeDateFormatType formatType)
The type of the format to use.
|
protected Date |
getDate() |
protected LocaleResolver |
getLocaleResolver() |
protected org.ocpsoft.prettytime.PrettyTime |
getPrettyTime(Locale locale) |
protected Map<Locale,org.ocpsoft.prettytime.PrettyTime> |
getPrettyTimesByLocale() |
RelativeDateFormatter |
locale(Locale locale)
The locale to use.
|
public RelativeDateFormatterDefault(Instant instant, LocaleResolver localeResolver)
public RelativeDateFormatterDefault(Date date, LocaleResolver localeResolver)
protected Date getDate()
protected LocaleResolver getLocaleResolver()
protected Map<Locale,org.ocpsoft.prettytime.PrettyTime> getPrettyTimesByLocale()
protected org.ocpsoft.prettytime.PrettyTime getPrettyTime(Locale locale)
public RelativeDateFormatter locale(Locale locale)
RelativeDateFormatterLocaleResolver.locale in interface RelativeDateFormatterpublic RelativeDateFormatter formatType(RelativeDateFormatType formatType)
RelativeDateFormatterRelativeDateFormatType.DEFAULT.formatType in interface RelativeDateFormatterpublic String format()
RelativeDateFormatterformat in interface RelativeDateFormatterCopyright © 2018. All rights reserved.