twigkit/tempo — pull request #46 by AaronOpfer (2012-05-01 14:55:18+00:00)
Title: Added features to 'date' and 'format' filters

I had to make these tweaks in order to use tempo.js on my sites. I had UTC dates that were being incorrectly converted to local time when going through the 'date' filter. I also had dollar amounts being filtered through the 'format' filter that ended up looking like this: "$8.2". I added a parameter to the 'format' filter that allows you to specify how many decimal places to put on the number.

'date' filter has a second argument that, if set to to 'UTC', causes 'date' to print the UTC time instead of local time

'format' filter now supports an optional argument that specifies a maximum number of decimal places for the number