From f638ff2116316e84eab52e167bfb72f847fbdce3 Mon Sep 17 00:00:00 2001 From: Osvaldo Ferrero Date: Wed, 11 Sep 2013 16:11:06 -0400 Subject: [PATCH] Added Unix Epoch option for formatDate helper. When the date provided to formatDate is a number, it is assumed to be the unix epoch time representation. --- js/lib/resthub/handlebars-helpers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/lib/resthub/handlebars-helpers.js b/js/lib/resthub/handlebars-helpers.js index 12344a0..dce4512 100644 --- a/js/lib/resthub/handlebars-helpers.js +++ b/js/lib/resthub/handlebars-helpers.js @@ -178,6 +178,9 @@ define(['handlebars-orig', 'moment', 'underscore-string'], function(Handlebars, } momentDate = moment(date, inputPattern); } + else if(typeof(date) === 'number') { + momentDate = moment(date); + } else { return date; }