软件包 | 描述 |
---|---|
java.time |
日期、时间、时刻主要的API,和持续时间。
|
java.time.chrono |
除了默认的标准以外的日历系统的通用的。
|
java.time.format |
提供打印和解析日期和时间的类。
|
Modifier and Type | Method and Description |
---|---|
String |
ZoneId.getDisplayName(TextStyle style, Locale locale)
获取该区的文字表述,如“英国时间”或“+”02:00。
|
String |
DayOfWeek.getDisplayName(TextStyle style, Locale locale)
获取文本表示形式,如“星期一”或“星期五”。
|
String |
Month.getDisplayName(TextStyle style, Locale locale)
获取文本表示形式,如“简”或“十二月”。
|
Modifier and Type | Method and Description |
---|---|
default String |
Chronology.getDisplayName(TextStyle style, Locale locale)
获取本年代的文本表示。
|
default String |
Era.getDisplayName(TextStyle style, Locale locale)
获取这个时代的文本表示。
|
Modifier and Type | Method and Description |
---|---|
TextStyle |
TextStyle.asNormal()
返回相同大小的正常样式。
|
TextStyle |
TextStyle.asStandalone()
返回相同大小的独立样式。
|
static TextStyle |
TextStyle.valueOf(String name)
返回此类型具有指定名称的枚举常量。
|
static TextStyle[] |
TextStyle.values()
返回一个数组包含该枚举类型的常量,它们的顺序声明。
|
Modifier and Type | Method and Description |
---|---|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendChronologyText(TextStyle textStyle)
附加的年表名称格式化程序。
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendLocalizedOffset(TextStyle style)
在局部区域偏移,如“GMT + 01:00,到格式化程序。
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendText(TemporalField field, TextStyle textStyle)
添加一个日期时间字段的文本格式化程序。
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendZoneText(TextStyle textStyle)
附加时区名称,如“英国夏令时间,到格式化程序。
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendZoneText(TextStyle textStyle, Set<ZoneId> preferredZones)
附加时区名称,如“英国夏令时间,到格式化程序。
|
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.