软件包 | 描述 |
---|---|
java.text |
提供用于处理独立于自然语言的方式处理文本、日期、数字和消息的类和接口。
|
java.text.spi |
在java.text包类服务提供程序类。
|
javax.swing.text |
提供类和接口处理编辑和不可编辑的文本组件。
|
Modifier and Type | Class and Description |
---|---|
class |
SimpleDateFormat
SimpleDateFormat 是格式和语言环境敏感的方式解析一个类的具体日期。
|
Modifier and Type | Method and Description |
---|---|
static DateFormat |
DateFormat.getDateInstance()
获取与默认格式样式为默认
FORMAT 本地化的日期格式。
|
static DateFormat |
DateFormat.getDateInstance(int style)
获取与给定的格式设置样式为默认
FORMAT 本地化的日期格式。
|
static DateFormat |
DateFormat.getDateInstance(int style, Locale aLocale)
获取与给定的格式设置样式为给定的本地化的日期格式。
|
static DateFormat |
DateFormat.getDateTimeInstance()
获取日期/时间的默认格式样式为默认
FORMAT 现场格式化程序。
|
static DateFormat |
DateFormat.getDateTimeInstance(int dateStyle, int timeStyle)
获取日期/时间格式化与给定的日期和时间格式设置样式为默认
FORMAT 现场。
|
static DateFormat |
DateFormat.getDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale)
获取日期/时间格式化与给定的格式设置样式为给定的现场。
|
static DateFormat |
DateFormat.getInstance()
获得一个默认的日期/时间格式化,使用短样式的日期和时间。
|
static DateFormat |
DateFormat.getTimeInstance()
获取时间的默认格式样式为默认
FORMAT 现场格式化程序。
|
static DateFormat |
DateFormat.getTimeInstance(int style)
获取与给定的格式设置样式为默认
FORMAT 设置时间格式。
|
static DateFormat |
DateFormat.getTimeInstance(int style, Locale aLocale)
获取与给定的格式风格给现场的时间格式。
|
Modifier and Type | Method and Description |
---|---|
abstract DateFormat |
DateFormatProvider.getDateInstance(int style, Locale locale)
返回一个新的
DateFormat 实例格式日期与给定的格式设置样式为指定的现场。
|
abstract DateFormat |
DateFormatProvider.getDateTimeInstance(int dateStyle, int timeStyle, Locale locale)
返回一个新的
DateFormat 实例格式的日期和时间与给定的格式设置样式为指定的现场。
|
abstract DateFormat |
DateFormatProvider.getTimeInstance(int style, Locale locale)
返回一个新的
DateFormat 实例格式时间与给定的格式设置样式为指定的现场。
|
Modifier and Type | Method and Description |
---|---|
void |
DateFormatter.setFormat(DateFormat format)
设置决定可以编辑和显示的法律价值的格式。
|
Constructor and Description |
---|
DateFormatter(DateFormat format)
返回一个指定的
Format DateFormatter配置实例。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.