Android.Text.Format.DateUtils.GetRelativeTimeSpanStringFormatted Method
Returns a string describing 'time' as a time relative to 'now'.

Syntax

[Android.Runtime.Register("getRelativeTimeSpanString", "(JJJI)Ljava/lang/CharSequence;", "")]
public static Java.Lang.ICharSequence GetRelativeTimeSpanStringFormatted (long time, long now, long minResolution, [Android.Runtime.GeneratedEnum] FormatStyleFlags flags)

Parameters

time
the time to describe, in milliseconds
now
the current time in milliseconds
minResolution
the minimum timespan to report. For example, a time 3 seconds in the past will be reported as "0 minutes ago" if this is set to MINUTE_IN_MILLIS. Pass one of 0, MINUTE_IN_MILLIS, HOUR_IN_MILLIS, DAY_IN_MILLIS, WEEK_IN_MILLIS
flags
a bit mask of formatting options, such as DateUtils.FORMAT_NUMERIC_DATE or DateUtils.FORMAT_ABBREV_RELATIVE

Returns

Documentation for this section has not yet been entered.

Remarks

Returns a string describing 'time' as a time relative to 'now'.

Time spans in the past are formatted like "42 minutes ago". Time spans in the future are formatted like "in 42 minutes".

Can use DateUtils.FORMAT_ABBREV_RELATIVE flag to use abbreviated relative times, like "42 mins ago".

[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