Condividi tramite


DateUtils.FormatSameDayTimeFormatted Method

Definition

Overloads

FormatSameDayTimeFormatted(Int64, Int64, AbbreviationLength, AbbreviationLength)
Obsolete.

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.

FormatSameDayTimeFormatted(Int64, Int64, Int32, Int32)

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.

FormatSameDayTimeFormatted(Int64, Int64, AbbreviationLength, AbbreviationLength)

Caution

This method was improperly bound. Please use FormatSameDayTimeFormatted(Int64, Int64, Int32, Int32).

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.

[System.Obsolete("This method was improperly bound. Please use FormatSameDayTimeFormatted(Int64, Int64, Int32, Int32).")]
public static Java.Lang.ICharSequence? FormatSameDayTimeFormatted (long then, long now, Android.Text.Format.AbbreviationLength dateStyle, Android.Text.Format.AbbreviationLength timeStyle);
[<System.Obsolete("This method was improperly bound. Please use FormatSameDayTimeFormatted(Int64, Int64, Int32, Int32).")>]
static member FormatSameDayTimeFormatted : int64 * int64 * Android.Text.Format.AbbreviationLength * Android.Text.Format.AbbreviationLength -> Java.Lang.ICharSequence

Parameters

then
Int64

the date to format

now
Int64

the base time

dateStyle
AbbreviationLength

how to format the date portion.

timeStyle
AbbreviationLength

how to format the time portion.

Returns

Attributes

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

FormatSameDayTimeFormatted(Int64, Int64, Int32, Int32)

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.

[Android.Runtime.Register("formatSameDayTime", "(JJII)Ljava/lang/CharSequence;", "")]
public static Java.Lang.ICharSequence? FormatSameDayTimeFormatted (long then, long now, int dateStyle, int timeStyle);
[<Android.Runtime.Register("formatSameDayTime", "(JJII)Ljava/lang/CharSequence;", "")>]
static member FormatSameDayTimeFormatted : int64 * int64 * int * int -> Java.Lang.ICharSequence

Parameters

then
Int64

the date to format

now
Int64

the base time

dateStyle
Int32

how to format the date portion.

timeStyle
Int32

how to format the time portion.

Returns

Attributes

Remarks

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.

The parameters dateFormat and timeFormat should each be one of java.text.DateFormat#DEFAULT, java.text.DateFormat#FULL, java.text.DateFormat#LONG, java.text.DateFormat#MEDIUM or java.text.DateFormat#SHORT

Java documentation for android.text.format.DateUtils.formatSameDayTime(long, long, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to