@nextcloud/vue
Version:
Nextcloud vue components
17 lines (16 loc) • 493 B
TypeScript
import { Locale } from 'date-fns';
import { Ref } from 'vue';
/**
* Reset locale cache. Only used for tests.
*
* @internal
*/
export declare function resetDateFnsLocaleCache(): void;
/**
* Try to load the corresponding locale from date-fns for {@link getCanonicalLocale()}.
* Fall back to {@link enUS} while loading, if the requested locale does not exist or could not be loaded.
*/
export default function useDateFnsLocale(): {
isLoading: Ref<boolean>;
locale: Ref<Locale>;
};