> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-agent-native-development.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Date

> Date — CometChat documentation.

This element displays the date with the in-built support of 3 date patterns.

## Properties

| Name | Type | Description |
| - | - | - |
| timestamp | number | Timestamp to be displayed in unix format |
| pattern | [DatePatterns](/web-shared/datepatterns) | Group of constants representing the in-built date patterns |
| customDateString | string | Override the in-built pattern with your custom representation of the timestamp |
| dateStyle | [dateStyle](/web-elements/date#datestyle) | Styling properties and values of the [Date](/web-elements/date) component |

## dateStyle

Styling properties and values of the element

| Name | Description |
| - | - |
| width | Sets the width of the element |
| height | Sets the height of the element |
| border | Sets the border of the element |
| borderRadius | Sets the border radius of the element |
| background | Sets all background style properties at once, such as color, image, origin and size, or repeat method. [Reference link](https://developer.mozilla.org/en-US/docs/Web/CSS/background) |
| textFont | Sets all the different properties of font for the date text. [Reference link](https://developer.mozilla.org/en-US/docs/Web/CSS/font) |
| textColor | Sets the foreground color of the date text. |

## Usage

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    import '@cometchat/uikit-elements'; //import the web elements package.
    import { DatePatterns } from 'uikit-resources'; //import the date pattern constant.

    //make use of the element; format the timestamp to the in-built time pattern
    <cometchat-date timestamp="1686234301" pattern={DatePatterns.time}></cometchat-date>
    ```
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.