Date Dynamic Content

In this article we're going to explain how to use Date Dynamic Content.

  1. Generic
  2. Days of Week
  3. Months of Year

Cornerstone will gladly give you the time of day (he's friendly like that). It can also give you the days of the week as well as months of the year. Use this set of Dynamic Content to compare dates, display a future date, or loop over the months or days in a year.

All data points in this Dynamic Content set utilize the PHP Datetime Formats. For instance, d as the format will output the day of the month using two digits with leading zeros. You can combine these format characters to a specific date format. For instance, Y-m-d will output the year, month, and then day (Example: 1994-01-23).

Date Dynamic Content

Generic

Generic takes any human readable date and converts it to whatever format you provide. For instance, +2 days on a Monday with l as the format will give you Wednesday.

Date Generic Dynamic Content

Days of Week

This will give you an array of days of the week. You can pass this into the Dynamic Content Looper Provider to then loop over each day of the week. In your Looper Consumer, you can then use {{dc:looper:item}} to output the day. You can configure how the day outputs via the format argument. The default is l which is the full day name.

As digits (01 or 31) {{dc:date:days_of_week format="d"}} As short day name (Wed or Mon) {{dc:date:days_of_week format="D"}}

Months of Year

This will give you an array of months of the week. You can pass this into the Dynamic Content Looper Provider to then loop over each day of the week. In your Looper Consumer, you can then use {{dc:looper:item}} to output the month. You can configure how the day outputs via the format argument. The default is F which is the full day name.

As digits (01 or 12) {{dc:date:months_of_year format="m"}} As short month name (Jan or Dec) {{dc:date:months_of_year format="M"}}

See something inaccurate? Let us know