Skip to main content

Calendar:Date template tag

Calendar:Date is a flexible utility tag that lets you generate and format date output for any arbitrary date, whether absolute or relative.

You'll typically use this tag in any of the following situations:

  • You need fully formatted output for a specific date that isn't tied to an event.
  • You want to calculate or display a date that is relative to another date.
  • You need to convert date segments or variables into a formattable date inside a template (Calendar-related or otherwise).

The key advantage of Calendar:Date is its flexibility. Because it uses Calendar's powerful date parameters, you're not limited to fixed dates like 2026-04-15—you can also output relative dates such as 2 weeks ago or next Friday.

Even better, by using the base_date parameter, relative dates don't have to be calculated from today. They can be calculated from any date you choose, giving you full control over how dates are derived and displayed.

{exp:calendar:date}

Parameters

base_date

The base date for relative date calculations. Both standard and easy-to-use text date formatting apply to this parameter. Only relevant if the output_date parameter is set to a relative value (ex: 1 week ago). Default is equivalent to today. E.g. base_date="2026-06-01".

output_date

The date you want to display. Both standard and easy-to-use text date formatting apply to this parameter. If the value is a relative date, the date will be relative to the value of base_date. E.g. output_date="2026-06-last".

output_format

Controls formatting of the output date, formatted using EE date formatting. If this parameter is not specified, the format defaults to %Y%m%d (e.g. 20260415). E.g. output_format="%Y-%m-%d".

Examples

Tomorrow

The following example is how you would generate tomorrow's date:

Weather forecast for Tomorrow -
{exp:calendar:date
base_date="today"
output_date="tomorrow"
output_format="%F %j, %Y"
}

1 Year from Tomorrow

Or 1 year from tomorrow's date would be done like this:

1 Year from Tomorrow would be
{exp:calendar:date
base_date="tomorrow"
output_date="1 year"
output_format="%F %j, %Y"
}

Convert Date Segments to Readable

If you've ever needed to turn date segments in the URL into a formattable date in your template, this is the perfect tag to use (Calendar related or not):

{exp:calendar:date
base_date="{segment_3}-{segment_4}-{segment_5}"
output_date="today"
output_format="%F %j, %Y"
}