useDate API
API reference for the useDate composable.
Related
Explore these related pages for additional context and usage patterns.
| Page | Category |
|---|---|
| useDate | Plugins |
| useLocale | Plugins |
| createPlugin | Foundation |
Functions
createDateContext
(options: DateContextOptions<Z>) => ContextTrinity<E>Creates a new date context trinity.
createDatePlugin
(options: DatePluginOptions<Z>) => import("/home/runner/work/0/0/packages/0/src/composables/index").PluginCreates a new date plugin.
useDate
(namespace?: string) => EReturns the current date context. Requires `createDatePlugin` to be installed with an adapter.
Options
locales
Record<string, string> | undefinedShort locale codes mapped to full Intl locale strings (e.g., { en: 'en-US' })
firstDayOfWeek
number | undefinedFirst day of week override. 0=Sun, 1=Mon, ... 6=Sat. Derived from locale if not set.