summaryrefslogtreecommitdiff
path: root/public/assets/js/util/format.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/util/format.js')
-rw-r--r--public/assets/js/util/format.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/public/assets/js/util/format.js b/public/assets/js/util/format.js
index 90a19d2..d034c26 100644
--- a/public/assets/js/util/format.js
+++ b/public/assets/js/util/format.js
@@ -48,10 +48,10 @@ function verbose_date (date) {
if (m < 10) m = "0" + m
if (h < 10) h = "0" + h
- var date = d + '-' + short_months[date.getMonth()] + '-' + date.getFullYear()
+ var date = d + '&#8209;' + short_months[date.getMonth()] + '&#8209;' + date.getFullYear()
var time = h + ':' + m + meridian
- return date + "&nbsp;<small>" + time + "</small>"
+ return date + " <small>" + time + "</small>"
}
function carbon_date (date, no_bold) {
var span = (+new Date() / 1000 - date)
@@ -74,13 +74,13 @@ function hush_views (n, bias, no_bold) {
var txt = commatize(n)
bias = bias || 1
n = n || 0
- if (n < 30) { return["quiet", n + " v."] }
- if (n < 200) { return ["quiet", txt + " v."] }
- else if (n < 500) { return ["quiet", txt + " v."] }
- else if (n < 1000) { return ["old", txt + " v."] }
- else if (n < 5000) { return ["med", txt + " kv."] }
- else if (nobold || n < 10000) { return ["recent", txt + " kv."] }
- else { return ["new", txt + " kv."] }
+ if (n < 30) { return["quiet", n + "&nbsp;v."] }
+ if (n < 200) { return ["quiet", txt + "&nbsp;v."] }
+ else if (n < 500) { return ["quiet", txt + "&nbsp;v."] }
+ else if (n < 1000) { return ["old", txt + "&nbsp;v."] }
+ else if (n < 5000) { return ["med", txt + "&nbsp;kv."] }
+ else if (nobold || n < 10000) { return ["recent", txt + "&nbsp;kv."] }
+ else { return ["new", txt + "&nbsp;kv."] }
}
function hush_size (n, bias, nobold) {
@@ -88,25 +88,25 @@ function hush_size (n, bias, nobold) {
bias = 1 || bias
n = n || 0
if (n < 1024) {
- return ["quiet", txt + " b."]
+ return ["quiet", txt + "&nbsp;b."]
}
if (n < 1024*1024) {
- return ["quiet", txt + " kb."]
+ return ["quiet", txt + "&nbsp;kb."]
}
else if (n < (20000000/bias)) {
- return ["quiet", txt + " mb."]
+ return ["quiet", txt + "&nbsp;mb."]
}
else if (n < (50000000/bias)) {
- return ["old", txt + " mb."]
+ return ["old", txt + "&nbsp;mb."]
}
else if (n < (80000000/bias)) {
- return ["med", txt + " mb."]
+ return ["med", txt + "&nbsp;mb."]
}
else if (nobold || n < (170000000/bias)) {
- return ["recent", txt + " mb."]
+ return ["recent", txt + "&nbsp;mb."]
}
else {
- return ["new", txt + " mb."]
+ return ["new", txt + "&nbsp;mb."]
}
}