DateFormat.GetDateFormat(Context) 方法

定义

返回一个 java.text.DateFormat 对象,该对象可以根据上下文的区域设置以短格式设置日期的格式。

[Android.Runtime.Register("getDateFormat", "(Landroid/content/Context;)Ljava/text/DateFormat;", "")]
public static Java.Text.DateFormat? GetDateFormat(Android.Content.Context? context);
[<Android.Runtime.Register("getDateFormat", "(Landroid/content/Context;)Ljava/text/DateFormat;", "")>]
static member GetDateFormat : Android.Content.Context -> Java.Text.DateFormat

参数

context
Context

应用程序上下文

返回

java.text.DateFormat正确设置日期格式的对象。

属性

注解

返回一个 java.text.DateFormat 对象,该对象可以根据上下文的区域设置以短格式设置日期的格式。

适用于 . 的 android.text.format.DateFormat.getDateFormat(android.content.Context)Java 文档

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于