import type { Locale } from 'date-fns'; import * as locales from 'date-fns/locale'; import type { IntlDateDisplayFormatEnum } from '../constants'; export type IntlDateLocaleCode = keyof typeof locales; export type IntlDateLanguage = string; export type IntlDateLocaleMap = Partial>; export type IntlDateLocaleConfig = { code: IntlDateLocaleCode; locale?: Locale; displayFormats?: Partial>; }; export function getLocale(lang: IntlDateLocaleCode): Locale { return locales[lang]; }