diff options
author | Ugnich Anton | 2013-01-05 17:49:05 +0700 |
---|---|---|
committer | Ugnich Anton | 2013-01-05 17:49:05 +0700 |
commit | 93b44885f6d306d0cb405c4ee9c436ee3ea4c921 (patch) | |
tree | 84f3d9fa98a18c929adc21555e22183a41453196 /src/java/com/juick/http/www/PageTemplates.java | |
parent | fc53fd7d63c703b2664e5cb0cbd6360e4b3f7bd5 (diff) |
PageTemplates.formatJSLocalTime
Diffstat (limited to 'src/java/com/juick/http/www/PageTemplates.java')
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index 11d20f32..9e4eff98 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -248,7 +248,7 @@ public class PageTemplates { Date date = sdfSQL.parse(ts); return "<script type=\"text/javascript\">" + "var d=new Date(" + date.getTime() + ");" - + "document.write(d.getDate()+'.'+(d.getMonth()+1)+'.'+d.getFullYear()+' '+d.getHours()+':'+d.getMinutes());" + + "document.write((d.getDate()<10?'0':'')+d.getDate()+'.'+(d.getMonth()<9?'0':'')+(d.getMonth()+1)+'.'+d.getFullYear()+' '+(d.getHours()<10?'0':'')+d.getHours()+':'+(d.getMinutes()<10?'0':'')+d.getMinutes());" + "</script>"; } catch (ParseException e) { System.err.print(e); |