Created
August 15, 2013 18:41
-
-
Save klickgists/6243515 to your computer and use it in GitHub Desktop.
Check dates from entries against current date. For use with #craft CMS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if date >= entry.start|date('Y-m-d') and date < entry.end|date('Y-m-d') %} | |
<p>current</p> | |
{% elseif date < entry.start|date('Y-m-d') %} | |
<p>future</p> | |
{% elseif date > entry.end|date('Y-m-d') %} | |
<p>past</p> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment