Temporal Locale Provider

Defines the locale to use in the temporal components.

View as Markdown
novembre 2025

API reference

Import the component plus the date-fns library locale and wrap them around your app.

If every temporal component in your app shares the same locale, you should use the provider once at the root of your application.

Anatomy
locale

Locale

en-US

Name
Description

The locale to use in temporal components.

Type
Locale | undefined
Default

en-US

children

ReactNode

Type
React.ReactNode

Examples

Nesting locales

The <TemporalLocaleProvider> can be nested to change the locale for a part of the application.

This could be useful when you need some temporal components in your application to use a different locale than the rest of your app.

novembre 2025
十一月 2025