Skip to content

Documentation / @ripl/utilities / timeFormat

Function: timeFormat() ​

timeFormat(value, options?): string

Defined in: packages/utilities/src/time.ts:37

Formats a Date (or epoch millisecond value) as a locale-aware string via Intl.DateTimeFormat. With no field options a short year/month/day format is used. Passed values explicitly by axes and tooltips; never bound to a scale.

Parameters ​

ParameterType
valuenumber | Date
optionsTimeFormatOptions

Returns ​

string