aboutsummaryrefslogtreecommitdiff
path: root/underlays
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-05-19 13:07:47 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-05-19 13:07:47 -0400
commitef003f48f4a3fe8fb67fda62c70a299b07d75976 (patch)
treecb5972026e6beed91b5eca2fa4962790244062bd /underlays
parent53b1c6f559c1d09fbdbc28c8e4d5090dd455cd26 (diff)
parent4c5987d150b26f638494638f7861fb7646542a37 (diff)
downloadikiwiki-ef003f48f4a3fe8fb67fda62c70a299b07d75976.tar
ikiwiki-ef003f48f4a3fe8fb67fda62c70a299b07d75976.tar.gz
Merge branch 'master' into po
Conflicts: debian/changelog
Diffstat (limited to 'underlays')
-rw-r--r--underlays/javascript/relativedate.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/underlays/javascript/relativedate.js b/underlays/javascript/relativedate.js
index 8e05d4065..5142332f1 100644
--- a/underlays/javascript/relativedate.js
+++ b/underlays/javascript/relativedate.js
@@ -45,6 +45,12 @@ function relativeDate(date) {
var offset = date.getTime() - now.getTime();
var seconds = Math.round(Math.abs(offset) / 1000);
+ // hack to avoid reading just in the future if there is a minor
+ // amount of clock slip
+ if (offset >= 0 && seconds < 30 * timeUnits['minute']) {
+ return "just now";
+ }
+
var ret = "";
var shown = 0;
for (i = 0; i < timeUnitOrder.length; i++) {