# Date value Format dates and timestamps with an explicit locale and timezone. ## Install ```sh npx shadcn@4.21.0 add lr-run/dir-ui/date-value#v0.1.3 ``` [Registry item with source and dependencies](https://github.com/lr-run/dir-ui/blob/v0.1.3/registry.json) Requires React 19, Tailwind CSS 4 and shadcn initialized with Base UI. Registry target placeholders resolve through components.json: @ui, @components, @hooks and @lib. Imports below use the conventional @/ prefix for illustration; the CLI rewrites them to your configured aliases. Shared components are installed once through registryDependencies. The installer merges shared theme rules into the stylesheet configured in components.json. Existing files are never forcibly overwritten; review CLI conflicts before accepting changes. No Dir runtime is required. ## DateValue, formatDate ```tsx import { DateValue, formatDate } from '@/components/ui/value.tsx' ``` | Prop | Type | Default / required | Notes | | --- | --- | --- | --- | | value | string \| null \| undefined | Required | YYYY-MM-DD or an ISO timestamp. | | locale | string | en-US | | | timeZone | string | UTC | | | includeTime | boolean | false | | Date-only values preserve the calendar date. Use an explicit timestamp offset for timezone conversion.