Android.Text.Format.DateUtils.GetRelativeDateTimeStringFormatted Method
Return string describing the elapsed time since startTime formatted like "[relative time/date], [time]".

Syntax

[Android.Runtime.Register("getRelativeDateTimeString", "(Landroid/content/Context;JJJI)Ljava/lang/CharSequence;", "")]
public static Java.Lang.ICharSequence GetRelativeDateTimeStringFormatted (Android.Content.Context c, long time, long minResolution, long transitionResolution, [Android.Runtime.GeneratedEnum] FormatStyleFlags flags)

Parameters

c
Documentation for this section has not yet been entered.
time
some time in the past.
minResolution
the minimum elapsed time (in milliseconds) to report when showing relative times. For example, a time 3 seconds in the past will be reported as "0 minutes ago" if this is set to DateUtils.MinuteInMillis.
transitionResolution
the elapsed time (in milliseconds) at which to stop reporting relative measurements. Elapsed times greater than this resolution will default to normal date formatting. For example, will transition from "6 days ago" to "Dec 12" when using DateUtils.WeekInMillis.
flags
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Return string describing the elapsed time since startTime formatted like "[relative time/date], [time]".

Example output strings for the US date format.

  • 3 mins ago, 10:15 AM
  • yesterday, 12:20 PM
  • Dec 12, 4:12 AM
  • 11/14/2007, 8:20 AM

[Android Documentation]

Requirements

Namespace: Android.Text.Format
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 3