agojs: 1 = 'a'

This commit is contained in:
jomo
2014-11-17 22:13:20 +01:00
parent 82f5e7edd9
commit 700802227d

View File

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