Skip to main content

Module length

Module length 

Source
Expand description

Length is a model of encoding information on how to format date and time by specifying the preferred length ! of date and time fields.

It is intended to represent dateStyle and timeStyle from ECMA 402 DateTimeFormat constructor options.

If either of the fields is omitted, the value will be formatted according to the pattern associated with the ! preferred length of the present field in a given locale.

If both fields are present, both parts of the value will be formatted and an additional connector pattern ! will be used to construct a full result. The type of the connector is determined by the length of the Date field.

Enumsยง

Date
Represents different lengths a date part can be formatted into. Each length has associated best pattern for it for a given locale.
Time
Represents different length lengths a time part can be formatted into. Each length has associated best pattern for it for a given locale.