Skip to main content

Modifier :diff

:diff does different things on different tags and fields:

  • Time difference from now on {date_created}, {date_updated}, and {payment_date}, under What to show in the picker.
    Example: {date_created:diff} gives 3 hours ago.
  • Time difference from now on {now}, {yesterday}, and {tomorrow}, under What to show in the picker.
    Example: {now:diff} gives 1 second from now.

Time difference from now

Shows as "3 days ago". With format, the format text wraps the phrase: format:%s since signup gives "3 days since signup".

ProductGravity Forms
RequiresGravity Forms 1.9 or later
In the pickerWhat to show, for {date_created}, {date_updated}, and {payment_date}

Examples

Output from the real plugin code, run on a test entry.

Merge tagOutputWithout the modifier
{date_created:diff}3 hours agoJanuary 15, 2026
{date_updated:diff}3 hours agoJanuary 15, 2026
{payment_date:diff}3 hours agoJanuary 15, 2026
{date_created:diff}

Rendered against an entry nine days older, where the result differs.

2 days agoJanuary 15, 2026
{date_updated:diff}

Rendered against an entry nine days older, where the result differs.

2 days agoJanuary 15, 2026
{payment_date:diff}

Rendered against an entry nine days older, where the result differs.

2 days agoJanuary 15, 2026

Works on

Merge tags: {date_created} · {date_updated} · {payment_date}.

Time difference from now

Renders "3 days ago" for past dates and "3 days from now" for future ones. Before GravityView 3.5 it was off by the site's time-zone offset.

Works in any merge tag while GravityView is active, including Gravity Forms notifications.

ProductGravityView
RequiresGravityView 2.30 or later
In the pickerWhat to show, for {now}, {yesterday}, and {tomorrow}

Examples

Output from the real plugin code, run on a test entry.

Merge tagOutputWithout the modifier
{now:diff}1 second from nowJanuary 15, 2026
{yesterday:diff}1 day agoJanuary 14, 2026
{tomorrow:diff}1 day from nowJanuary 16, 2026

Works on

Merge tags: {now} · {yesterday} · {tomorrow}.