Skip to Content

Date

Show date in a specific format.

Interface

interface IDate extends IElement { date: string | Date; format?: object; fromNow?: boolean; size?: TextSize; }

Example

Date
{ "type": "Date", "date": "{base.modifiedDate}", "size": "small", "fromNow":true }

Properties

type

Must be “Date”.

  • Type: "Date"

  • Required: Yes

date

Date in ISO format.

  • Type: string | Date

  • Required: Yes

  • Example: "2020-10-09T07:24:21.166Z"

format

Date format (reference ).

  • Type: object

  • Required: No

  • Example:

{ "day": "2-digit", "month": "numeric", "year": "numeric" ​​​​​​​}

fromNow

If true, displays the time that has passed until the specified date

  • Type: boolean

  • Required: No

size

Controls size of date.

Last updated on