Home Reference Source Repository
import {ReducedPrinterParser} from 'js-joda/src/format/parser/NumberPrinterParser.js'
public class | source

ReducedPrinterParser

Extends:

NumberPrinterParser → ReducedPrinterParser

Prints and parses a reduced numeric date-time field.

Constructor Summary

Public Constructor
public

constructor(field: TemporalField, width: number, maxWidth: number, baseValue: number, baseDate: ChronoLocalDate)

Constructor.

Method Summary

Public Methods
public

getValue(context: DateTimePrintContext, value: number): *

public
public

toString(): *

public
public

Inherited Summary

From class NumberPrinterParser
public

field(): *

public

maxWidth(): *

public

minWidth(): *

public

parse(context: *, text: *, position: *): *

public

print(context: *, buf: *): boolean

public

signStyle(): *

public

toString(): *

public
public

withSubsequentWidth(subsequentWidth: *): *

Public Constructors

public constructor(field: TemporalField, width: number, maxWidth: number, baseValue: number, baseDate: ChronoLocalDate) source

Constructor.

Override:

NumberPrinterParser#constructor

Params:

NameTypeAttributeDescription
field TemporalField

the field to print, validated not null

width number

the field width, from 1 to 10

maxWidth number

the field max width, from 1 to 10

baseValue number

the base value

baseDate ChronoLocalDate

the base date

Public Methods

public getValue(context: DateTimePrintContext, value: number): * source

Params:

NameTypeAttributeDescription
context DateTimePrintContext
value number

Return:

*

public isFixedWidth(context: DateTimeParseContext): * source

Params:

NameTypeAttributeDescription
context DateTimeParseContext

Return:

*

public toString(): * source

Override:

NumberPrinterParser#toString

Return:

*

public withFixedWidth(): * source

Override:

NumberPrinterParser#withFixedWidth

Return:

*

public withSubsequentWidth(subsequentWidth: number): ReducedPrinterParser source

Override:

NumberPrinterParser#withSubsequentWidth

Params:

NameTypeAttributeDescription
subsequentWidth number