Skip to content

Instantly share code, notes, and snippets.

@willrjmarshall
Created April 23, 2014 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willrjmarshall/11203904 to your computer and use it in GitHub Desktop.
Save willrjmarshall/11203904 to your computer and use it in GitHub Desktop.
Darkswarm.filter "date_in_words", ->
(date) ->
moment(date).fromNow()
Darkswarm.filter "sensible_timeframe", (date_in_wordsFilter)->
(date) ->
if moment().add('days', 2) < moment(date)
"Orders open"
else
"Closing in #{date_in_wordsFilter(date)}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment