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

DateTimePrintContext

Static Method Summary

Static Public Methods
public static

Constructor Summary

Public Constructor
public

constructor(temporal: TemporalAccessor, localeOrFormatter: DateTimeFormatter | Locale, symbols: DecimalStyle)

Method Summary

Public Methods
public

Ends the printing of an optional segment of the input.

public

getValue(field: *): *

Gets the value of the specified field.

public

Gets a value using a query.

public

setDateTime(temporal: *)

Sets the date-time being output.

public

Starts the printing of an optional segment of the input.

public

symbols(): *

public

Gets the temporal object being output.

Static Public Methods

public static adjust(temporal: TemporalAccessor, formatter: DateTimeFormatter): TemporalAccessor source

Params:

NameTypeAttributeDescription
temporal TemporalAccessor
formatter DateTimeFormatter

Public Constructors

public constructor(temporal: TemporalAccessor, localeOrFormatter: DateTimeFormatter | Locale, symbols: DecimalStyle) source

Params:

NameTypeAttributeDescription
temporal TemporalAccessor
localeOrFormatter DateTimeFormatter | Locale
symbols DecimalStyle

Public Methods

public endOptional() source

Ends the printing of an optional segment of the input.

public getValue(field: *): * source

Gets the value of the specified field.

This will return the value for the specified field.

Params:

NameTypeAttributeDescription
field *

the field to find, not null

Return:

*

the value, null if not found and optional is true

Throw:

*

DateTimeException if the field is not available and the section is not optional

public getValueQuery(query: TemporalQuery): * source

Gets a value using a query.

Params:

NameTypeAttributeDescription
query TemporalQuery

the query to use, not null

Return:

*

the result, null if not found and optional is true

Throw:

*

DateTimeException if the type is not available and the section is not optional

public setDateTime(temporal: *) source

Sets the date-time being output.

Params:

NameTypeAttributeDescription
temporal *

the date-time object, not null

public startOptional() source

Starts the printing of an optional segment of the input.

public symbols(): * source

Return:

*

public temporal(): TemporalAccessor source

Gets the temporal object being output.

Return:

TemporalAccessor

the temporal object, not null