1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-27 04:25:15 +00:00

More refactoring of relativedate implementation

This commit is contained in:
Jeremy Ruston
2012-10-28 18:41:48 +00:00
parent c0a00f856e
commit cfb3b42438
2 changed files with 11 additions and 6 deletions

View File

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