import { Story, Preview, ArgsTable } from '@storybook/addon-docs/blocks';
import { DateTime } from './DateTime';

# DateTime

<Preview>
  <Story id="content-datetime--unix-timestamp" />
</Preview>

A component to show a date and time. Use this when you have a timestamp that you want to display.
It changes the time and date format based on the locale. Changing up the date separators and order in the date.

## Options

There's optional props to you can use to show time only and date only. There is also the option to define exactly how the date should look
using the [Intl spec formatting options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options).

## Props

<ArgsTable of={DateTime} />
