Archived
smaller ago.js
This commit is contained in:
@@ -23,14 +23,8 @@ function Ago(nodes, options) {
|
|||||||
return new Date(node.getAttribute("datetime"));
|
return new Date(node.getAttribute("datetime"));
|
||||||
},
|
},
|
||||||
format: function(time, unit) {
|
format: function(time, unit) {
|
||||||
if (!unit) {
|
if (!unit) return "just now";
|
||||||
return "just now";
|
var tail = time < 0 ? " ahead" : " ago";
|
||||||
}
|
|
||||||
if (time < 0) {
|
|
||||||
var tail = " ahead";
|
|
||||||
} else {
|
|
||||||
var tail = " ago";
|
|
||||||
}
|
|
||||||
return Math.abs(time) + " " + unit + tail;
|
return Math.abs(time) + " " + unit + tail;
|
||||||
},
|
},
|
||||||
plural: {
|
plural: {
|
||||||
|
|||||||
Reference in New Issue
Block a user