DateUtils.FormatSameDayTime Método

Definición

Sobrecargas

Nombre Description
FormatSameDayTime(Int64, Int64, AbbreviationLength, AbbreviationLength)
Obsoletos.
FormatSameDayTime(Int64, Int64, Int32, Int32)

Dar formato a una fecha y hora de modo que, si el valor de entonces es el mismo día que ahora, se muestra solo la hora y, si es un día diferente, se muestra solo la fecha.

FormatSameDayTime(Int64, Int64, AbbreviationLength, AbbreviationLength)

Precaución

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

Parámetros

then
Int64
now
Int64
dateStyle
AbbreviationLength
timeStyle
AbbreviationLength

Devoluciones

Atributos

Comentarios

Las partes de esta página son modificaciones basadas en el trabajo creado y compartido por el Android y se usan según los términos descritos en creative Creative Commons 2.5 Attribution License.

Se aplica a

FormatSameDayTime(Int64, Int64, Int32, Int32)

Dar formato a una fecha y hora de modo que, si el valor de entonces es el mismo día que ahora, se muestra solo la hora y, si es un día diferente, se muestra solo la fecha.

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

Parámetros

then
Int64

fecha a la que se va a dar formato

now
Int64

la hora base

dateStyle
Int32

cómo dar formato a la parte de fecha.

timeStyle
Int32

cómo dar formato a la parte de hora.

Devoluciones

Comentarios

Dar formato a una fecha y hora de modo que, si el valor de entonces es el mismo día que ahora, se muestra solo la hora y, si es un día diferente, se muestra solo la fecha.

Los parámetros dateFormat y timeFormat deben ser uno de java.text.DateFormat#DEFAULT, java.text.DateFormat#FULL, java.text.DateFormat#LONGo java.text.DateFormat#MEDIUMjava.text.DateFormat#SHORT

Java documentación para android.text.format.DateUtils.formatSameDayTime(long, long, int, int).

Las partes de esta página son modificaciones basadas en el trabajo creado y compartido por el Android y se usan según los términos descritos en creative Creative Commons 2.5 Attribution License.

Se aplica a