Current date in templates
Is there a way to reference the current date from within a
template? I tried using {{ now }} but it doesnt appear
to return anything.
For example: I have a collection of meetings organized by year
and I only want to display the current year's meetings in this
template. My thoughts were to use {{ now | date: '%Y'
}} to get the current year.
Comments are currently closed for this discussion. You can start a new one.
2 Posted by John Nunemaker on 28 May, 2010 04:05 PM
{{ 'now' | date:'%Y' }} is the most correct way that I can think of.
3 Posted by Joshua Suggs on 28 May, 2010 06:08 PM
Ahhh. I left off the quotes around 'now'. Thanks.
4 Posted by John Nunemaker on 28 May, 2010 06:17 PM
No problem.