Tips tagged “Date”
- Dynamically display Year from entries not from this year
-
Posted on April 14, 2010 by Erik Reagan
I personally hate going to blog sites and not knowing when an article was published. I often see “June 2” but no year. Sometimes I’m actually interested in whether or not that means this June 2nd or last June second, or even an June from years ago.
Here is a simple way to automagically display the
- More precise date comparisons
-
Posted on June 22, 2009 by Jason Morehead
As with most EE variables, you can do comparisons on date variables, like so:
{if date_variable == "foo"}
Do something
{/if}However, if you need more precise date comparisons, you can do something like this:
{if "{date_variable format='%m/%d/%Y'}" == "01/01/2009"}
Do something
{/if}- Validating monthly archive URLs, exceptional SEO and clever titles.
Posted on June 09, 2009 by Leevi Graham
<!-- Validate monthly archive URLS like /blog/archive/02/2009 and display blog posts -->
<!--
Validate the URL using the query module.
Users cannot have crazy urls like /blog/archive/13/2009
Assign a couple of nice variables for titles / meta
-->
{exp:query sql="SELECT- Copyright Date
Posted on May 29, 2009 by Jonathan Longnecker
Easy way to make sure your copyright date is always up to date:
© {current_time format="%Y"}
