From 700802227d5be2aee7a323041f61238dab33becd Mon Sep 17 00:00:00 2001 From: jomo Date: Mon, 17 Nov 2014 22:13:20 +0100 Subject: [PATCH] agojs: 1 = 'a' --- app/assets/javascripts/app.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app.js b/app/assets/javascripts/app.js index b198bf7..c05b891 100644 --- a/app/assets/javascripts/app.js +++ b/app/assets/javascripts/app.js @@ -42,5 +42,13 @@ $(function(){ } }); - Ago(); + Ago({ + format: function(time, unit) { + time = Math.abs(time); + if (!unit) return "just now"; + if (time === 1) time = "a"; + var tail = time < 0 ? " ahead" : " ago"; + return time + " " + unit + tail; + } + }); }); \ No newline at end of file