語言

DateUtils.FormatSameDayTimeFormatted 方法

定義

多載

名稱 Description
FormatSameDayTimeFormatted(Int64, Int64, AbbreviationLength, AbbreviationLength)
已淘汰.

格式化日期/時間,如果 then 和現在在同一天,只顯示時間;如果是不同的日期,則只顯示日期。

FormatSameDayTimeFormatted(Int64, Int64, Int32, Int32)

格式化日期/時間,如果 then 和現在在同一天,只顯示時間;如果是不同的日期,則只顯示日期。

FormatSameDayTimeFormatted(Int64, Int64, AbbreviationLength, AbbreviationLength)

警告

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

格式化日期/時間,如果 then 和現在在同一天,只顯示時間;如果是不同的日期,則只顯示日期。

[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

參數

then
Int64

節目格式的日期

now
Int64

基礎時間

dateStyle
AbbreviationLength

如何格式化日期部分。

timeStyle
AbbreviationLength

如何格式化時間部分。

傳回

屬性

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

FormatSameDayTimeFormatted(Int64, Int64, Int32, Int32)

格式化日期/時間,如果 then 和現在在同一天,只顯示時間;如果是不同的日期,則只顯示日期。

[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

參數

then
Int64

節目格式的日期

now
Int64

基礎時間

dateStyle
Int32

如何格式化日期部分。

timeStyle
Int32

如何格式化時間部分。

傳回

屬性

備註

格式化日期/時間,如果 then 和現在在同一天,只顯示時間;如果是不同的日期,則只顯示日期。

參數 dateFormat 與 timeFormat 應各自為 java.text.DateFormat#DEFAULT、 java.text.DateFormat#FULL、 java.text.DateFormat#LONGjava.text.DateFormat#MEDIUM 或 之一java.text.DateFormat#SHORT

Java 文件 android.text.format.DateUtils.formatSameDayTime(long, long, int, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於