Skip to main content

Merge tag: {yesterday}

Yesterday.

ProductGravityView
RequiresGravityView 2.30 or later
Needs an entryNo

Modifiers

What the merge tag picker offers on this tag.

What to show

ModifierDescriptionRequires
diffTime difference from now. Renders "3 days ago" for past dates and "3 days from now" for future ones.GravityView 2.30 or later
no_tz_offsetSkip the timezone offset. Formats the stored value without shifting it into the site timezone. Beats the default branch, so it is a rendering choice rather than a flag.GravityView 2.33 or later
rawRaw stored date. GravityView 2.30 or later
timestampUnix timestamp. Also switches the relative-date tags to UTC rather than site-local time.GravityView 2.30 or later

Change the output

ModifierDescriptionRequires
formatCustom date format. A PHP date() format string. Attached with a colon and consumes the rest of the modifier string, so it must come last; escape a literal colon as \:.GravityView 2.30 or later

Other settings

ModifierDescriptionRequires
timeInclude the time. GravityView 2.30 or later

Examples

Rendered by real Gravity Forms and GravityKit PHP against a test entry.

Merge tagOutput
{yesterday}January 14, 2026

With a modifier

Merge tagOutputWithout the modifier
{yesterday:raw}2026-01-14 09:00:00January 14, 2026
{yesterday:timestamp}1768363200January 14, 2026
{yesterday:diff}19 hours agoJanuary 14, 2026
{yesterday:time}January 14, 2026 at 4:00 amJanuary 14, 2026
{yesterday:format:Y-m-d}2026-01-14January 14, 2026