Mercurial > urweb
diff lib/js/urweb.js @ 1629:438561303d02
timeFormat .urp directive
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 04 Dec 2011 14:40:12 -0500 |
parents | bd34a4af516a |
children | 4798ad652c94 |
line wrap: on
line diff
--- a/lib/js/urweb.js Sat Dec 03 17:25:51 2011 -0500 +++ b/lib/js/urweb.js Sun Dec 04 14:40:12 2011 -0500 @@ -114,11 +114,14 @@ // Time, represented as counts of microseconds since the epoch +var time_format = "%c"; + function showTime(tm) { - var newDate = new Date(); - newDate.setTime(tm / 1000); - var r = newDate.toUTCString(); - return r; + return strftime(time_format, tm); +} + +function showTimeHtml(tm) { + return eh(showTime(tm)); } function now() {