Package | Description |
---|---|
java.time.format |
Provides classes to print and parse dates and times.
|
Modifier and Type | Method and Description |
---|---|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.append(DateTimeFormatter formatter)
Appends all the elements of a formatter to the builder.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendChronologyId()
Appends the chronology ID, such as 'ISO' or 'ThaiBuddhist', to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendChronologyText(TextStyle textStyle)
Appends the chronology name to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendFraction(TemporalField field,
int minWidth,
int maxWidth,
boolean decimalPoint)
Appends the fractional value of a date-time field to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendInstant()
Appends an instant using ISO-8601 to the formatter, formatting fractional
digits in groups of three.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendInstant(int fractionalDigits)
Appends an instant using ISO-8601 to the formatter with control over
the number of fractional digits.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendLiteral(char literal)
Appends a character literal to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendLiteral(String literal)
Appends a string literal to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendLocalized(FormatStyle dateStyle,
FormatStyle timeStyle)
Appends a localized date-time pattern to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendLocalizedOffset(TextStyle style)
Appends the localized zone offset, such as 'GMT+01:00', to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendOffset(String pattern,
String noOffsetText)
Appends the zone offset, such as '+01:00', to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendOffsetId()
Appends the zone offset, such as '+01:00', to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendOptional(DateTimeFormatter formatter)
Appends a formatter to the builder which will optionally format/parse.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendPattern(String pattern)
Appends the elements defined by the specified pattern to the builder.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendText(TemporalField field)
Appends the text of a date-time field to the formatter using the full
text style.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendText(TemporalField field,
Map<Long,String> textLookup)
Appends the text of a date-time field to the formatter using the specified
map to supply the text.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendText(TemporalField field,
TextStyle textStyle)
Appends the text of a date-time field to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendValue(TemporalField field)
Appends the value of a date-time field to the formatter using a normal
output style.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendValue(TemporalField field,
int width)
Appends the value of a date-time field to the formatter using a fixed
width, zero-padded approach.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendValue(TemporalField field,
int minWidth,
int maxWidth,
SignStyle signStyle)
Appends the value of a date-time field to the formatter providing full
control over formatting.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendValueReduced(TemporalField field,
int width,
int maxWidth,
ChronoLocalDate baseDate)
Appends the reduced value of a date-time field to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendValueReduced(TemporalField field,
int width,
int maxWidth,
int baseValue)
Appends the reduced value of a date-time field to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendZoneId()
Appends the time-zone ID, such as 'Europe/Paris' or '+02:00', to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendZoneOrOffsetId()
Appends the time-zone ID, such as 'Europe/Paris' or '+02:00', to
the formatter, using the best available zone ID.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendZoneRegionId()
Appends the time-zone region ID, such as 'Europe/Paris', to the formatter,
rejecting the zone ID if it is a
ZoneOffset . |
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendZoneText(TextStyle textStyle)
Appends the time-zone name, such as 'British Summer Time', to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendZoneText(TextStyle textStyle,
Set<ZoneId> preferredZones)
Appends the time-zone name, such as 'British Summer Time', to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.optionalEnd()
Ends an optional section.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.optionalStart()
Mark the start of an optional section.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.padNext(int padWidth)
Causes the next added printer/parser to pad to a fixed width using a space.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.padNext(int padWidth,
char padChar)
Causes the next added printer/parser to pad to a fixed width.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.parseCaseInsensitive()
Changes the parse style to be case insensitive for the remainder of the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.parseCaseSensitive()
Changes the parse style to be case sensitive for the remainder of the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.parseDefaulting(TemporalField field,
long value)
Appends a default value for a field to the formatter for use in parsing.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.parseLenient()
Changes the parse style to be lenient for the remainder of the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.parseStrict()
Changes the parse style to be strict for the remainder of the formatter.
|
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, 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.