Skip to main content

Function: formatCaption()

formatCaption(month, options?, dateLib?): string

Defined in: src/formatters/formatCaption.ts:15

Formats the caption of the month.

Parameters

ParameterTypeDescription
monthDateThe date representing the month.
options?DateLibOptionsConfiguration options for the date library.
dateLib?DateLibThe date library to use for formatting. If not provided, a new instance is created.

Returns

string

The formatted caption as a string.

Default Value

LLLL y (e.g., "November 2022").

See

https://daypicker.dev/docs/translation#custom-formatters