From 3c7501bdb276667df89448dcbe7a1425eb3fd674 Mon Sep 17 00:00:00 2001 From: jomo Date: Mon, 17 Nov 2014 23:06:18 +0100 Subject: [PATCH] agojs: 'an' hour --- app/assets/javascripts/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/app.js b/app/assets/javascripts/app.js index c05b891..6670485 100644 --- a/app/assets/javascripts/app.js +++ b/app/assets/javascripts/app.js @@ -46,7 +46,7 @@ $(function(){ format: function(time, unit) { time = Math.abs(time); if (!unit) return "just now"; - if (time === 1) time = "a"; + if (time === 1) time = (unit[0] == "h") ? "an" : "a"; var tail = time < 0 ? " ahead" : " ago"; return time + " " + unit + tail; }