date Object

Date/time object for use within content template displays.

Attributes

Attribute Required Description
date Yes date Date object. Can also access this by outputting the object as a whole.
id Yes string UUID of content block containing date object.

Category

Block Objects

Description

The date block object defines the blueprint for content blocks based on the base date content template. It contains a date/time stamp.

Within your content templates’ displays, you would reference the block’s var_name containing the text data. (It won’t necessarily be named date but rather what you defined in the content_templates.json file.)

Examples

Here is an example display template using a date content block with a var_name of start_date:

{{ start_date }} is the same as {{ start_date.date }}

You’ll likely want to output date objects using the date filter:

      {{ start_date | date: '%A, %B %d, %Y' }}
      {{ start_date | date: '%-m/%-d/%y' }}
      {{ start_date | date: '%Y' }}

Example Output

      Friday, July 17, 2017
      7/17/17
      2017