<p>The current date is: {{ now|datefmt('MMMM d') }}</p>
Output
day_name
Output the name of the day using the "0 index" of the day of the week.
Output
to_date
Utility to parse a date from a string
Optionally, you can also pass a format to the parsing
to_datetime
Utility to parse a date and time from a string
to_time
Utility to parse a time from a string
Optionally, you can also pass a format to the parsing
from_timestamp
Can be used to convert unix timestamps (i.e. an integer) into date/time to be used by other functions.
Output
Hide content based on date
Using the advanced jinja2 templating to hide a piece of content depending on the date. This can be used to have something show up before/after/during a date range.
This uses our to_date jinja filter. Take note of the greater than and less than operators.
The to_date is parsed as the first minute and hour of the day so using greater and less than operators is the best way to write the conditionals.
Today, future, or past comparisons
is_today
Show something if the date is today
is_future
Show something if the date is in the future
is_past
Show something if the date is in the past
Combining the above filters
Show something if the date is today or in the future