Class CursorCalendarUnitDateFormatter
Defines a default date formatter to provide labels for different kind of tooltips, e.g. used by CursorModifier.
Implements
Inherited Members
Namespace:
Assembly: .dll
Syntax
public class CursorCalendarUnitDateFormatter implements labelProviders.ICalendarUnitDateFormatter
Constructors
CursorCalendarUnitDateFormatter()
Creates a new instance of CursorCalendarUnitDateFormatter class.
Declaration
public CursorCalendarUnitDateFormatter()
CursorCalendarUnitDateFormatter(Locale locale, TimeZone timeZone)
Creates a new instance of CursorCalendarUnitDateFormatter class.
Declaration
public CursorCalendarUnitDateFormatter(Locale locale, TimeZone timeZone)
Parameters
Type | Name | Description |
---|---|---|
Locale | locale | The Locale to use by this formatter. |
TimeZone | timeZone | The TimeZone to use by this formatter. |
CursorCalendarUnitDateFormatter(Locale locale, TimeZone timeZone, String cursorDateFormat, String granularCursorDateFormat)
Creates a new instance of CursorCalendarUnitDateFormatter class.
Declaration
public CursorCalendarUnitDateFormatter(Locale locale, TimeZone timeZone, String cursorDateFormat, String granularCursorDateFormat)
Parameters
Type | Name | Description |
---|---|---|
Locale | locale | The Locale to use by this formatter. |
TimeZone | timeZone | The TimeZone to use by this formatter. |
String | cursorDateFormat | The default format string string to use |
String | granularCursorDateFormat | The default format string string to use when CalendarUnit is greater than CalendarUnit#MONTH |
Methods
format(Date date, int calendarUnit)
Formats date for the axis according to the specified calendarUnit
.
Declaration
public CharSequence format(Date date, int calendarUnit)
Parameters
Type | Name | Description |
---|---|---|
Date | date | |
int | calendarUnit |
Returns
Type | Description |
---|---|
CharSequence |
getLocale()
Gets locale used by this date formatter.
Declaration
public final Locale getLocale()
Returns
Type | Description |
---|---|
Locale |
getTimeZone()
Gets time zone used by this date formatter.
Declaration
public final TimeZone getTimeZone()
Returns
Type | Description |
---|---|
TimeZone |
tryApplyDefaultFormat(String defaultFormat)
Tries to apply default format to underlying default DateFormat.
Declaration
public void tryApplyDefaultFormat(String defaultFormat)
Parameters
Type | Name | Description |
---|---|---|
String | defaultFormat |