agojs: 'an' hour

This commit is contained in:
jomo
2014-11-17 23:06:18 +01:00
parent 700802227d
commit 3c7501bdb2

View File

@@ -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;
}