Skip to main content

formatDateNum

formatDateNum

formatDateNum(effectiveDataType: undefined | string , value: string | number , formatPattern: string , options: any ) : any

Formats a date-related numeric value based on its effective data type, a given format pattern, and options.

This function is used to format date-related numeric values (such as days of the month, weeks of the year, or hours of the day) according to the specified

Function Parameters

effectiveDataType:::

  • effectiveDataType: undefined | string

The effective data type to format, which determines how the value will be interpreted (e.g.,

value:::

  • value: string | number

The numeric value (or string) to format. This value is typically a date-related number.

formatPattern:::

  • formatPattern: string

The pattern to use for formatting the value (e.g., for day or month formatting).

options:::

  • options: any

An object containing various formatting options, such as locale-based string formats, date constants, and settings for the quarter start month and special value handling.

Returns

any

Defined in : link:https://github.com/thoughtspot/ts-chart-sdk/blob/f477c20/src/utils/date-formatting.ts#L542

--