From 6c6061400d641ddb347c208dc10c7e73bcebff6e Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Mon, 17 Oct 2016 17:02:55 -0700 Subject: updates to time and date format --- management/editor/editor.go | 2 +- system/admin/static/common/js/util.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/management/editor/editor.go b/management/editor/editor.go index 49e412c..13043d3 100644 --- a/management/editor/editor.go +++ b/management/editor/editor.go @@ -48,7 +48,7 @@ func Form(post Editable, fields ...Field) ([]byte, error) {
- diff --git a/system/admin/static/common/js/util.js b/system/admin/static/common/js/util.js index cf47af4..7bd821d 100644 --- a/system/admin/static/common/js/util.js +++ b/system/admin/static/common/js/util.js @@ -46,13 +46,10 @@ function getPartialTime(unix) { function getPartialDate(unix) { var date = new Date(unix); var d = {}; + d.yyyy = date.getFullYear(); - var month = date.getMonth()+1; - if (month < 10) { - month = "0" + String(month); - } - d.mm = month; + d.mm = date.getMonth()+1; var day = date.getDate(); if (day < 10) { -- cgit v1.2.3