| 类 | 描述 |
|---|---|
| DateTimeFormatter |
格式化器用于打印和解析日期时间对象。
|
| DateTimeFormatterBuilder |
Builder创建日期格式化程序。
|
| DecimalStyle |
在日期和时间格式中使用的本地化十进制格式。
|
| Enum | 描述 |
|---|---|
| FormatStyle |
枚举本地化日期,时间或日期时间格式化的风格。
|
| ResolverStyle |
列举不同的方式来解决日期和时间。
|
| SignStyle |
列举处理正/负号的方法。
|
| TextStyle |
枚举文本格式和解析的风格。
|
| 异常 | 描述 |
|---|---|
| DateTimeParseException |
解析期间发生错误时抛出异常。
|
提供打印和解析日期和时间的类。
打印和解析基于DateTimeFormatter类。 实例通常由获得DateTimeFormatter ,然而DateTimeFormatterBuilder可以,如果需要更多的功率来使用。
本地化通过在格式化程序上调用withLocale(Locale)进行。 使用DecimalStyle进一步定制是可能的。
除非另有说明,否则将null参数传递给此程序包中任何类或接口中的构造函数或方法将导致抛出NullPointerException 。 Javadoc“@param”定义用于总结空行为。 “@throws NullPointerException ”没有在每个方法中明确记录。
所有计算应检查数字溢出,并抛出ArithmeticException或DateTimeException 。
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.