Prism · Time
$dateDiff
Measures from one date to another, in a unit.
{
createdAt: '2024-01-15T08:30:00Z',
now: '2024-04-22T10:00:00Z',
}{
$dateDiff: {
from: { $ref: '$.createdAt' },
to: { $ref: '$.now' },
unit: 'day',
},
}98
Runs in this page on the installed package. The input and the expected output are defined by the example.