1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Coding style tweaks for #399

This commit is contained in:
Jermolene 2014-02-10 17:34:10 +00:00
parent f0ab607ea1
commit 441d9078fa

View File

@ -209,8 +209,8 @@ Returns an object with these members:
*/
exports.getRelativeDate = function(delta) {
var futurep = false;
if (delta < 0) {
delta = -1*delta;
if(delta < 0) {
delta = -1 * delta;
futurep = true;
}
var units = [
@ -225,7 +225,7 @@ exports.getRelativeDate = function(delta) {
var result = Math.floor(delta / units[t].duration);
if(result >= 2) {
var desc = result + " " + units[t].name;
if (futurep) {
if(futurep) {
desc = desc + " from now";
} else {
desc = desc + " ago";