DateUtils.FormatSameDayTime Method

Definition

Overloads

FormatSameDayTime(Int64, Int64, AbbreviationLength, AbbreviationLength)
Obsolete.
FormatSameDayTime(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.

FormatSameDayTime(Int64, Int64, AbbreviationLength, AbbreviationLength)

Caution

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

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

Parameters

then
Int64
now
Int64
dateStyle
AbbreviationLength
timeStyle
AbbreviationLength

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

FormatSameDayTime(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.

public static string? FormatSameDayTime (long then, long now, int dateStyle, int timeStyle);
static member FormatSameDayTime : int64 * int64 * int * int -> string

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

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