語言

DateUtils.FormatSameDayTime 方法

定義

多載

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

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

FormatSameDayTime(Int64, Int64, AbbreviationLength, AbbreviationLength)

警告

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

參數

then
Int64
now
Int64
dateStyle
AbbreviationLength
timeStyle
AbbreviationLength

傳回

屬性

備註

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

適用於

FormatSameDayTime(Int64, Int64, Int32, Int32)

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

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

參數

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 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於