java.time.format 包的共享 API
编辑java.time.format 包的共享 API
编辑请参阅 共享 API,以获取所有包和类的概述。
DateTimeFormatter
编辑- static DateTimeFormatter BASIC_ISO_DATE
- static DateTimeFormatter ISO_DATE
- static DateTimeFormatter ISO_DATE_TIME
- static DateTimeFormatter ISO_INSTANT
- static DateTimeFormatter ISO_LOCAL_DATE
- static DateTimeFormatter ISO_LOCAL_DATE_TIME
- static DateTimeFormatter ISO_LOCAL_TIME
- static DateTimeFormatter ISO_OFFSET_DATE
- static DateTimeFormatter ISO_OFFSET_DATE_TIME
- static DateTimeFormatter ISO_OFFSET_TIME
- static DateTimeFormatter ISO_ORDINAL_DATE
- static DateTimeFormatter ISO_TIME
- static DateTimeFormatter ISO_WEEK_DATE
- static DateTimeFormatter ISO_ZONED_DATE_TIME
- static DateTimeFormatter RFC_1123_DATE_TIME
- static DateTimeFormatter ofLocalizedDate(FormatStyle)
- static DateTimeFormatter ofLocalizedDateTime(FormatStyle)
- static DateTimeFormatter ofLocalizedDateTime(FormatStyle, FormatStyle)
- static DateTimeFormatter ofLocalizedTime(FormatStyle)
- static DateTimeFormatter ofPattern(null)
- static DateTimeFormatter ofPattern(null, Locale)
- static TemporalQuery parsedExcessDays()
- static TemporalQuery parsedLeapSecond()
- boolean equals(Object)
- null format(TemporalAccessor)
- void formatTo(TemporalAccessor, Appendable)
- Chronology getChronology()
- DecimalStyle getDecimalStyle()
- Locale getLocale()
- Set getResolverFields()
- ResolverStyle getResolverStyle()
- ZoneId getZone()
- int hashCode()
- TemporalAccessor parse(CharSequence)
- def parse(CharSequence, TemporalQuery)
- TemporalAccessor parseBest(CharSequence, TemporalQuery[])
- TemporalAccessor parseUnresolved(CharSequence, ParsePosition)
- Format toFormat()
- Format toFormat(TemporalQuery)
- null toString()
- DateTimeFormatter withChronology(Chronology)
- DateTimeFormatter withDecimalStyle(DecimalStyle)
- DateTimeFormatter withLocale(Locale)
- DateTimeFormatter withResolverFields(Set)
- DateTimeFormatter withResolverStyle(ResolverStyle)
- DateTimeFormatter withZone(ZoneId)
DateTimeFormatterBuilder
编辑- static null getLocalizedDateTimePattern(FormatStyle, FormatStyle, Chronology, Locale)
- DateTimeFormatterBuilder()
- DateTimeFormatterBuilder append(DateTimeFormatter)
- DateTimeFormatterBuilder appendChronologyId()
- DateTimeFormatterBuilder appendChronologyText(TextStyle)
- DateTimeFormatterBuilder appendFraction(TemporalField, int, int, boolean)
- DateTimeFormatterBuilder appendInstant()
- DateTimeFormatterBuilder appendInstant(int)
- DateTimeFormatterBuilder appendLiteral(null)
- DateTimeFormatterBuilder appendLocalized(FormatStyle, FormatStyle)
- DateTimeFormatterBuilder appendLocalizedOffset(TextStyle)
- DateTimeFormatterBuilder appendOffset(null, null)
- DateTimeFormatterBuilder appendOffsetId()
- DateTimeFormatterBuilder appendOptional(DateTimeFormatter)
- DateTimeFormatterBuilder appendPattern(null)
- DateTimeFormatterBuilder appendText(TemporalField)
- DateTimeFormatterBuilder appendText(TemporalField, TextStyle)
- DateTimeFormatterBuilder appendValue(TemporalField)
- DateTimeFormatterBuilder appendValue(TemporalField, int)
- DateTimeFormatterBuilder appendValue(TemporalField, int, int, SignStyle)
- DateTimeFormatterBuilder appendValueReduced(TemporalField, int, int, int)
- DateTimeFormatterBuilder appendZoneId()
- DateTimeFormatterBuilder appendZoneOrOffsetId()
- DateTimeFormatterBuilder appendZoneRegionId()
- DateTimeFormatterBuilder appendZoneText(TextStyle)
- DateTimeFormatterBuilder appendZoneText(TextStyle, Set)
- boolean equals(Object)
- int hashCode()
- DateTimeFormatterBuilder optionalEnd()
- DateTimeFormatterBuilder optionalStart()
- DateTimeFormatterBuilder padNext(int)
- DateTimeFormatterBuilder padNext(int, char)
- DateTimeFormatterBuilder parseCaseInsensitive()
- DateTimeFormatterBuilder parseCaseSensitive()
- DateTimeFormatterBuilder parseDefaulting(TemporalField, long)
- DateTimeFormatterBuilder parseLenient()
- DateTimeFormatterBuilder parseStrict()
- DateTimeFormatter toFormatter()
- DateTimeFormatter toFormatter(Locale)
- null toString()
DateTimeParseException
编辑- DateTimeParseException(null, CharSequence, int)
- boolean equals(Object)
- int getErrorIndex() 获取错误索引
- null getLocalizedMessage() 获取本地化错误信息
- null getMessage() 获取错误信息
- null getParsedString() 获取已解析的字符串
- StackTraceElement[] getStackTrace() 获取堆栈跟踪信息
- int hashCode()
- null toString()
DecimalStyle 十进制样式
编辑- static DecimalStyle STANDARD 标准十进制样式
- static Set getAvailableLocales() 获取可用的区域设置
- static DecimalStyle of(Locale) 根据区域设置获取十进制样式
- static DecimalStyle ofDefaultLocale() 获取默认区域设置的十进制样式
- boolean equals(Object)
- char getDecimalSeparator() 获取小数点分隔符
- char getNegativeSign() 获取负号
- char getPositiveSign() 获取正号
- char getZeroDigit() 获取零字符
- int hashCode()
- null toString()
- DecimalStyle withDecimalSeparator(char) 设置小数点分隔符
- DecimalStyle withNegativeSign(char) 设置负号
- DecimalStyle withPositiveSign(char) 设置正号
- DecimalStyle withZeroDigit(char) 设置零字符
FormatStyle 格式样式
编辑- static FormatStyle FULL 全格式
- static FormatStyle LONG 长格式
- static FormatStyle MEDIUM 中等格式
- static FormatStyle SHORT 短格式
- static FormatStyle valueOf(null) 根据字符串获取格式样式
- static FormatStyle[] values() 获取所有格式样式
- int compareTo(Enum) 与另一个枚举值比较
- boolean equals(Object)
- int hashCode()
- null name() 获取枚举常量的名称
- int ordinal() 获取枚举常量的序数
- null toString()
ResolverStyle 解析器样式
编辑- static ResolverStyle LENIENT 宽松解析
- static ResolverStyle SMART 智能解析
- static ResolverStyle STRICT 严格解析
- static ResolverStyle valueOf(null) 根据字符串获取解析器样式
- static ResolverStyle[] values() 获取所有解析器样式
- int compareTo(Enum) 与另一个枚举值比较
- boolean equals(Object)
- int hashCode()
- null name() 获取枚举常量的名称
- int ordinal() 获取枚举常量的序数
- null toString()
SignStyle 符号样式
编辑- static SignStyle ALWAYS 始终显示符号
- static SignStyle EXCEEDS_PAD 超过填充时显示符号
- static SignStyle NEVER 从不显示符号
- static SignStyle NORMAL 正常显示符号
- static SignStyle NOT_NEGATIVE 非负数不显示符号
- static SignStyle valueOf(null) 根据字符串获取符号样式
- static SignStyle[] values() 获取所有符号样式
- int compareTo(Enum) 与另一个枚举值比较
- boolean equals(Object)
- int hashCode()
- null name() 获取枚举常量的名称
- int ordinal() 获取枚举常量的序数
- null toString()
TextStyle 文本样式
编辑- static TextStyle FULL 全文本
- static TextStyle FULL_STANDALONE 独立全文本
- static TextStyle NARROW 简写文本
- static TextStyle NARROW_STANDALONE 独立简写文本
- static TextStyle SHORT 短文本
- static TextStyle SHORT_STANDALONE 独立短文本
- static TextStyle valueOf(null) 根据字符串获取文本样式
- static TextStyle[] values() 获取所有文本样式
- TextStyle asNormal() 获取普通文本样式
- TextStyle asStandalone() 获取独立文本样式
- int compareTo(Enum) 与另一个枚举值比较
- boolean equals(Object)
- int hashCode()
- boolean isStandalone() 是否为独立文本样式
- null name() 获取枚举常量的名称
- int ordinal() 获取枚举常量的序数
- null toString()