Example usage for Java android.text.format DateUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
long | SECOND_IN_MILLIS |
long | MINUTE_IN_MILLIS |
long | HOUR_IN_MILLIS |
long | DAY_IN_MILLIS |
long | WEEK_IN_MILLIS |
long | YEAR_IN_MILLIS This constant is actually the length of 364 days, not of a year! |
int | FORMAT_SHOW_TIME |
int | FORMAT_SHOW_WEEKDAY |
int | FORMAT_SHOW_YEAR |
int | FORMAT_NO_YEAR |
int | FORMAT_SHOW_DATE |
int | FORMAT_NO_MONTH_DAY |
int | FORMAT_12HOUR |
int | FORMAT_24HOUR |
int | FORMAT_CAP_AMPM |
int | FORMAT_NO_NOON |
int | FORMAT_NO_MIDNIGHT |
int | FORMAT_ABBREV_TIME |
int | FORMAT_ABBREV_WEEKDAY |
int | FORMAT_ABBREV_MONTH |
int | FORMAT_NUMERIC_DATE |
int | FORMAT_ABBREV_RELATIVE |
int | FORMAT_ABBREV_ALL |
int | FORMAT_CAP_NOON_MIDNIGHT |
int | FORMAT_NO_NOON_MIDNIGHT |
int | LENGTH_LONG Request the full spelled-out name. |
int | LENGTH_MEDIUM Request an abbreviated version of the name. |
int | LENGTH_SHORT Request a shorter abbreviated version of the name. |
int | LENGTH_SHORTEST Request an even shorter abbreviated version of the name. |
String | formatDateRange(Context context, long startMillis, long endMillis, int flags) Formats a date or a time range according to the local conventions. |
Formatter | formatDateRange(Context context, Formatter formatter, long startMillis, long endMillis, int flags, String timeZone) Formats a date or a time range according to the local conventions. |
Formatter | formatDateRange(Context context, Formatter formatter, long startMillis, long endMillis, int flags) Formats a date or a time range according to the local conventions. |
String | formatDateTime(Context context, long millis, int flags) Formats a date or a time according to the local conventions. |
String | formatElapsedTime(long elapsedSeconds) Formats an elapsed time in the form "MM:SS" or "H:MM:SS" for display on the call-in-progress screen. |
CharSequence | formatSameDayTime(long then, long now, int dateStyle, int timeStyle) Format a date / time such that if the then is on the same day as now, it shows just the time and if it's a different day, it shows just the date. |
String | getAMPMString(int ampm) Return a localized string for AM or PM. |
String | getDayOfWeekString(int dayOfWeek, int abbrev) Return a string for the day of the week. |
String | getMonthString(int month, int abbrev) Return a localized string for the month of the year. |
CharSequence | getRelativeDateTimeString(Context c, long time, long minResolution, long transitionResolution, int flags) Return string describing the elapsed time since startTime formatted like "[relative time/date], [time]". |
CharSequence | getRelativeTimeSpanString(long time, long now, long minResolution) Returns a string describing 'time' as a time relative to 'now'. |
CharSequence | getRelativeTimeSpanString(Context c, long millis, boolean withPreposition) |
CharSequence | getRelativeTimeSpanString(long time, long now, long minResolution, int flags) Returns a string describing 'time' as a time relative to 'now'. |
CharSequence | getRelativeTimeSpanString(Context c, long millis) Convenience function to return relative time string without preposition. |
CharSequence | getRelativeTimeSpanString(long startTime) Returns a string describing the elapsed time since startTime. |
boolean | isToday(long when) |