WeekBasedFieldPrinterParser

Prints or parses a localized pattern from a localized field. The specific formatter and parameters is not selected until the field is to be printed or parsed. The locale is needed to select the proper WeekFields from which the field for day-of-week, week-of-month, or week-of-year is selected. Hence the inherited field NumberPrinterParser.field is unused.

Constructors

this
this(char chr, int count, int minWidth, int maxWidth)

Constructor.

this
this(char chr, int count, int minWidth, int maxWidth, int subsequentWidth)

Constructor.

Members

Functions

format
bool format(DateTimePrintContext context, StringBuilder buf)
Undocumented in source. Be warned that the author may not have intended to support it.
parse
int parse(DateTimeParseContext context, string text, int position)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
withFixedWidth
WeekBasedFieldPrinterParser withFixedWidth()

Returns a new instance with fixed width flag set.

withSubsequentWidth
WeekBasedFieldPrinterParser withSubsequentWidth(int subsequentWidth)

Returns a new instance with an updated subsequent width.

Inherited Members

From NumberPrinterParser

EXCEED_POINTS
enum long[] EXCEED_POINTS;

Array of 10 to the power of n.

field
TemporalField field;
Undocumented in source.
minWidth
int minWidth;
Undocumented in source.
maxWidth
int maxWidth;
Undocumented in source.
signStyle
SignStyle signStyle;
Undocumented in source.
subsequentWidth
int subsequentWidth;
Undocumented in source.
withFixedWidth
NumberPrinterParser withFixedWidth()

Returns a new instance with fixed width flag set.

withSubsequentWidth
NumberPrinterParser withSubsequentWidth(int subsequentWidth)

Returns a new instance with an updated subsequent width.

format
bool format(DateTimePrintContext context, StringBuilder buf)
Undocumented in source. Be warned that the author may not have intended to support it.
getValue
long getValue(DateTimePrintContext context, long value)

Gets the value to output.

isFixedWidth
bool isFixedWidth(DateTimeParseContext context)

For NumberPrinterParser, the width is fixed depending on the minWidth, maxWidth, signStyle and whether subsequent fields are fixed. @param context the context @return true if the field is fixed width @see DateTimeFormatterBuilder#appendValue(hunt.time.temporal.TemporalField, int)

parse
int parse(DateTimeParseContext context, string text, int position)
Undocumented in source. Be warned that the author may not have intended to support it.
setValue
int setValue(DateTimeParseContext context, long value, int errorPos, int successPos)

Stores the value.

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta