summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ikiwiki/relativedate.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/ikiwiki/relativedate.js b/ikiwiki/relativedate.js
index 2a270d6..b2f6518 100644
--- a/ikiwiki/relativedate.js
+++ b/ikiwiki/relativedate.js
@@ -33,11 +33,11 @@ function showDates() {
}
var timeUnits = [
- { unit: 'year', seconds: 60 * 60 * 24 * 364 },
- { unit: 'month', seconds: 60 * 60 * 24 * 30 },
- { unit: 'day', seconds: 60 * 60 * 24 },
- { unit: 'hour', seconds: 60 * 60 },
- { unit: 'minute', seconds: 60 },
+ { unit: 'år', units: 'år', seconds: 60 * 60 * 24 * 364 },
+ { unit: 'måned', units: 'måneder', seconds: 60 * 60 * 24 * 30 },
+ { unit: 'dag', units: 'dage', seconds: 60 * 60 * 24 },
+ { unit: 'time', units: 'timer', seconds: 60 * 60 },
+ { unit: 'minut', units: 'minutter', seconds: 60 },
];
function relativeDate(date) {
@@ -48,7 +48,7 @@ function relativeDate(date) {
// hack to avoid reading just in the future if there is a minor
// amount of clock slip
if (offset >= 0 && seconds < 30 * 60 * 60) {
- return "just now";
+ return "lige før";
}
var ret = "";
@@ -58,8 +58,8 @@ function relativeDate(date) {
var num = Math.floor(seconds / timeUnits[i].seconds);
seconds -= num * timeUnits[i].seconds;
if (ret)
- ret += "and ";
- ret += num + " " + timeUnits[i].unit + (num > 1 ? "s" : "") + " ";
+ ret += "og ";
+ ret += num + " " + (num > 1 ? timeUnits[i].unit : timeUnits[i].units) + " ";
if (++shown == 2)
break;
@@ -69,7 +69,7 @@ function relativeDate(date) {
}
if (! ret)
- ret = "less than a minute "
+ ret = "for mindre end et minut "
- return ret + (offset < 0 ? "ago" : "from now");
+ return ret + (offset < 0 ? "siden" : "fra nu");
}