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