useDateFormatter
Provides a memoized Intl.DateTimeFormat instance for date formatting.
Provides a memoized Intl.DateTimeFormat instance for locale-aware date formatting. It caches formatter instances for performance and automatically respects the specified locale.
Import#
import { useDateFormatter } from '@volue/wave-react';
Example#
API Reference#
Arguments#
Prop | Type | Default |
|---|---|---|
locale | string | — |
options | Intl.DateTimeFormatOptions | — |
Returns#
Intl.DateTimeFormat — A memoized formatter instance.