Prism · Time

$date

Writes a date in a given format. The format is a dayjs format string.

The source
{ createdAt: '2024-01-15T08:30:00Z' }
The config
{
  $date: { value: { $ref: '$.createdAt' }, format: 'YYYY-MM-DD' },
}
What comes out
'2024-01-15'
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.