Language

DateUtils.GetRelativeDateTimeString メソッド

定義

startTime 以降の経過時間を記述する文字列を返します 。"[相対時刻/日付], [time]" のように書式設定されています。

public static string? GetRelativeDateTimeString(Android.Content.Context? c, long time, long minResolution, long transitionResolution, Android.Text.Format.FormatStyleFlags flags);
static member GetRelativeDateTimeString : Android.Content.Context * int64 * int64 * int64 * Android.Text.Format.FormatStyleFlags -> string

パラメーター

time
Int64

過去のいくつかの時間。

minResolution
Int64

相対時間を表示するときに報告する最小経過時間 (ミリ秒)。 たとえば、過去 3 秒は、 #MINUTE_IN_MILLISに設定されている場合、"0 分前" と報告されます。

transitionResolution
Int64

相対測定値の報告を停止する経過時間 (ミリ秒)。 この解像度より長い経過時間は、既定で通常の日付書式になります。 たとえば、 #WEEK_IN_MILLISを使用すると、"7 日前" から "12 月 12 日" に切り替えられます。

返品

注釈

startTime 以降の経過時間を記述する文字列を返します 。"[相対時刻/日付], [time]" のように書式設定されています。

米国の日付形式の出力文字列の例。 <ul><li>3 分前, 10:15 AM</li><li>Yesterday, 12:20 PM</li><li>Dec 12, 4:12 AM</li><li>11/14/2007, 8:20 AM</li></ul>

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象