Skip to content

Instantly share code, notes, and snippets.

@makbeta
Created November 30, 2012 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makbeta/4173275 to your computer and use it in GitHub Desktop.
Save makbeta/4173275 to your computer and use it in GitHub Desktop.
Luminate CMS: Displaying a date range (start to end date) with proper formatting
<t:if test="year(start_date) != year(end_date)"><t:value id="start_date" format="5" /> - <t:value id="end_date" format="5" /></t:if>
<t:else>
<t:if test="month(start_date) == month(end_date)"><t:value id="start_date" format="MMMMMMMMMM d" /> - <t:value id="end_date" format="d, yyyy" /></t:if>
<t:else><t:value id="start_date" format="MMMMMMMMMM d" /> - <t:value id="end_date" format="5" /></t:else>
</t:else>
</t:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment