Tips tagged “Comparison”
- 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}
