Skip to content

taqwim-core-utilsDocs


taqwim-core-utils / getLocaleData

Function: getLocaleData()

getLocaleData(locale, key): string | string[]

Retrieves the locale data based on the specified locale and key.

Parameters

locale: string

The locale for which to retrieve the data.

key: "day" | "month" | "year" | "years" | "months" | "week" | "weeks" | "days" | "monthsLong" | "monthsMedium" | "monthsShort" | "weekDaysLong" | "weekDaysMedium" | "weekDaysShort" | "today" | "from" | "to"

The key indicating the specific data to retrieve.

Returns

string | string[]

The locale data as an array of strings or a single string.

Source

getLocaleData.ts:13

Released under the MIT License.