DateUtils.FormatSameDayTimeFormatted 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| FormatSameDayTimeFormatted(Int64, Int64, AbbreviationLength, AbbreviationLength) |
已过时.
设置日期/时间的格式,以便如果当时与现在位于同一天,则只显示时间,如果日期不同,则只显示日期。 |
| FormatSameDayTimeFormatted(Int64, Int64, Int32, Int32) |
设置日期/时间的格式,以便如果当时与现在位于同一天,则只显示时间,如果日期不同,则只显示日期。 |
FormatSameDayTimeFormatted(Int64, Int64, AbbreviationLength, AbbreviationLength)
注意
This method was improperly bound. Please use FormatSameDayTimeFormatted(Int64, Int64, Int32, Int32).
设置日期/时间的格式,以便如果当时与现在位于同一天,则只显示时间,如果日期不同,则只显示日期。
[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
如何设置时间部分的格式。
返回
then如果时间与字符序列位于同一天now,或者其日期,则为字符序列。 将重载与整数样式参数一起使用,因为此重载使用不正确的枚举类型。
- 特性
注解
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
FormatSameDayTimeFormatted(Int64, Int64, Int32, Int32)
设置日期/时间的格式,以便如果当时与现在位于同一天,则只显示时间,如果日期不同,则只显示日期。
[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如果时间与字符序列位于同一天now,或者其日期,则为字符序列。
- 特性
注解
设置日期/时间的格式,以便如果当时与现在位于同一天,则只显示时间,如果日期不同,则只显示日期。
参数 dateFormat 和 timeFormat 应分别为 <
适用于 . 的 android.text.format.DateUtils.formatSameDayTime(long, long, int, int)Java 文档
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。