Skip to content

Instantly share code, notes, and snippets.

View jasongabler's full-sized avatar

Jason Gabler jasongabler

  • San Francisco, CA, USA
View GitHub Profile
@jasongabler
jasongabler / calendar.twig
Last active January 17, 2018 21:26 — forked from aknosis/calendar.twig
Table based calendar only using Twig
{#
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") %}
Data (in activityByDay) is collated by activityByDay[year][month][day], which holds a list
of activity data for each day. YMMV for your own needs.