Implemented code for formatting dates in templates using moment.js. Fixes #6.