Skip to content

Date & time

PlaceholderDefault output
{date}12 Apr 2026
{time}9:41 AM
{datetime}12 Apr 2026, 9:41 AM
{day}Sunday

All four use your device’s locale and timezone automatically.

Use format to control the output pattern. Format strings follow SimpleDateFormat syntax:

{date format="yyyy-MM-dd"} → 2026-04-12
{date format="MM/dd/yyyy"} → 04/12/2026
{date format="d MMM yyyy"} → 12 Apr 2026
{time format="HH:mm"} → 09:41
{time format="h:mm a"} → 9:41 AM
{datetime format="yyyy-MM-dd HH:mm"} → 2026-04-12 09:41

Common pattern tokens:

TokenMeaningExample
yyyy4-digit year2026
yy2-digit year26
MMMonth number (zero-padded)04
MMMMonth abbreviationApr
MMMMFull month nameApril
ddDay of month (zero-padded)12
dDay of month12
HHHour 0–23 (zero-padded)09
hhHour 1–12 (zero-padded)09
mmMinute41
ssSecond05
aAM/PMAM
EEEEFull day nameSunday
EEEShort day nameSun

Use offset to shift the date or time forward or backward from now:

{date offset="+1d"} → tomorrow
{date offset="-1d"} → yesterday
{date offset="+7d"} → one week from now
{date offset="+1M"} → one month from now
{date offset="+1y"} → one year from now
{time offset="+2h"} → 2 hours from now
{datetime offset="+30m"} → 30 minutes from now

Offset units:

UnitMeaning
yYears
MMonths (uppercase M)
dDays
hHours
mMinutes (lowercase m)

Multiple offsets can be combined, space-separated, and are applied in order:

{date offset="+1y -3d"} → one year from now, minus 3 days

Combine offset and format together:

{date offset="+30d" format="MMM d"} → May 12

Month arithmetic clamps to end-of-month: January 31 + 1 month = February 28/29.