mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-30 10:36:39 +00:00
More refactoring of relativedate implementation
This commit is contained in:
@@ -171,12 +171,14 @@ exports.getRelativeDate = function(delta) {
|
||||
var result = Math.floor(delta / units[t].duration);
|
||||
if(result >= 2) {
|
||||
return {
|
||||
delta: delta,
|
||||
description: result + " " + units[t].name + " ago",
|
||||
updatePeriod: units[t].duration
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
delta: delta,
|
||||
description: "1 second ago",
|
||||
updatePeriod: 1000
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user