{# time can be any string acceptable by http://www.php.net/strtotime, the template will output that time's month. If you don't want to pass in a date you can set time like this: {% set time = "now"|date("U") %} {% set time = "December 2012"|date("U") %} How ever you want to output items onto the calendar is a different issue, but I'd assume pushing everything into an array numerically indexed by that day: $days = array(1=>array('Something on the first'),31=>array('Halloween')); #} {% set daysInMonth = time|date('t') %} {% set startDow = time|date('F 1\\s\\t Y')|date('w') %} {% set dow = startDow %} {% for day in range(1,daysInMonth) %} {% if loop.first and startDow != 0 %} {% endif %} {% if loop.last and dow != 6 %} {% endif %} {% if dow == 6 %} {% set dow = 0 %} {% else %} {% set dow = dow + 1 %} {% endif %} {% endfor %}
{{ time|date('F') }}
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
{{ day }}
{# day content here #}