summaryrefslogtreecommitdiff
path: root/public/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js')
-rw-r--r--public/assets/js/lib/views/details/comments.js2
-rw-r--r--public/assets/js/lib/views/details/files.js2
-rw-r--r--public/assets/js/util/format.js4
3 files changed, 4 insertions, 4 deletions
diff --git a/public/assets/js/lib/views/details/comments.js b/public/assets/js/lib/views/details/comments.js
index 164a3b1..168cc3f 100644
--- a/public/assets/js/lib/views/details/comments.js
+++ b/public/assets/js/lib/views/details/comments.js
@@ -15,7 +15,7 @@ var CommentsView = FormView.extend({
},
parse: function(comment){
- var datetime = verbose_date(comment.date)
+ var datetime = verbose_date(comment.date, true)
var t = this.template.replace(/{{username}}/g, comment.username)
.replace(/{{comment}}/g, comment.comment)
.replace(/{{date}}/g, datetime[0])
diff --git a/public/assets/js/lib/views/details/files.js b/public/assets/js/lib/views/details/files.js
index 5a19519..b19cf3c 100644
--- a/public/assets/js/lib/views/details/files.js
+++ b/public/assets/js/lib/views/details/files.js
@@ -29,7 +29,7 @@ var FilesView = FormView.extend({
parse: function(file){
var size = hush_size(file.size)
- var datetime = verbose_date(file.date)
+ var datetime = verbose_date(file.date, true)
var date_class = carbon_date(file.date)
var t = this.template.replace(/{{username}}/g, file.username)
diff --git a/public/assets/js/util/format.js b/public/assets/js/util/format.js
index de8fd65..b789602 100644
--- a/public/assets/js/util/format.js
+++ b/public/assets/js/util/format.js
@@ -22,7 +22,7 @@ function privacy_dot (p) {
}
var short_months = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")
-function verbose_date (date) {
+function verbose_date (date, no_pad_hours) {
var date = new Date(date * 1000)
var d = date.getDate()
var m = date.getMinutes()
@@ -46,7 +46,7 @@ function verbose_date (date) {
if (d < 10) d = "0" + d
if (m < 10) m = "0" + m
- if (h < 10) h = "0" + h
+ if (! no_pad_hours && h < 10) h = "0" + h
var date = d + '&#8209;' + short_months[date.getMonth()] + '&#8209;' + date.getFullYear()
var time = h + ':' + m + meridian