batmanjs/batman — pull request #956 by sdomino (2014-01-29 22:57:51+00:00)
Title: Feature/time filters

This feature adds some new filters that help with formatting and working with dates. This is in no way meant to be a complete list, but simply what we have implemented as we encountered a need.

There are plenty of additional dateFormats that could be included, as well as additional 'conversion helpers' for inline conversion of dates (conversions for day, week, year, etc...). Many use cases for these could be handled in encoders, or accessors, but sometimes it is nice to be able to do it in place in the view.

Final note. I wanted to add a timeAgoInWords (just like the Rails version); There is a nice jQuery plugin that has already accomplished this (https://github.com/rmm5t/jquery-timeago), and before using it (or duplicated most of the logic), I wanted to find out if including the library as a dependency is a consideration or if the logic needs to be re-written as batman's own.