Java android.text.format DateUtils fields, constructors, methods, implement or subclass

Example usage for Java android.text.format DateUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.text.format DateUtils.

The text is from its open source code.

Field

longSECOND_IN_MILLIS
longMINUTE_IN_MILLIS
longHOUR_IN_MILLIS
longDAY_IN_MILLIS
longWEEK_IN_MILLIS
longYEAR_IN_MILLIS
This constant is actually the length of 364 days, not of a year!
intFORMAT_SHOW_TIME
intFORMAT_SHOW_WEEKDAY
intFORMAT_SHOW_YEAR
intFORMAT_NO_YEAR
intFORMAT_SHOW_DATE
intFORMAT_NO_MONTH_DAY
intFORMAT_12HOUR
intFORMAT_24HOUR
intFORMAT_CAP_AMPM
intFORMAT_NO_NOON
intFORMAT_NO_MIDNIGHT
intFORMAT_ABBREV_TIME
intFORMAT_ABBREV_WEEKDAY
intFORMAT_ABBREV_MONTH
intFORMAT_NUMERIC_DATE
intFORMAT_ABBREV_RELATIVE
intFORMAT_ABBREV_ALL
intFORMAT_CAP_NOON_MIDNIGHT
intFORMAT_NO_NOON_MIDNIGHT
intLENGTH_LONG
Request the full spelled-out name.
intLENGTH_MEDIUM
Request an abbreviated version of the name.
intLENGTH_SHORT
Request a shorter abbreviated version of the name.
intLENGTH_SHORTEST
Request an even shorter abbreviated version of the name.

Method

StringformatDateRange(Context context, long startMillis, long endMillis, int flags)
Formats a date or a time range according to the local conventions.
FormatterformatDateRange(Context context, Formatter formatter, long startMillis, long endMillis, int flags, String timeZone)
Formats a date or a time range according to the local conventions.
FormatterformatDateRange(Context context, Formatter formatter, long startMillis, long endMillis, int flags)
Formats a date or a time range according to the local conventions.
StringformatDateTime(Context context, long millis, int flags)
Formats a date or a time according to the local conventions.
StringformatElapsedTime(long elapsedSeconds)
Formats an elapsed time in the form "MM:SS" or "H:MM:SS" for display on the call-in-progress screen.
CharSequenceformatSameDayTime(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.
StringgetAMPMString(int ampm)
Return a localized string for AM or PM.
StringgetDayOfWeekString(int dayOfWeek, int abbrev)
Return a string for the day of the week.
StringgetMonthString(int month, int abbrev)
Return a localized string for the month of the year.
CharSequencegetRelativeDateTimeString(Context c, long time, long minResolution, long transitionResolution, int flags)
Return string describing the elapsed time since startTime formatted like "[relative time/date], [time]".
CharSequencegetRelativeTimeSpanString(long time, long now, long minResolution)
Returns a string describing 'time' as a time relative to 'now'.
CharSequencegetRelativeTimeSpanString(Context c, long millis, boolean withPreposition)
CharSequencegetRelativeTimeSpanString(long time, long now, long minResolution, int flags)
Returns a string describing 'time' as a time relative to 'now'.
CharSequencegetRelativeTimeSpanString(Context c, long millis)
Convenience function to return relative time string without preposition.
CharSequencegetRelativeTimeSpanString(long startTime)
Returns a string describing the elapsed time since startTime.
booleanisToday(long when)