comparison 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
comparison
equal deleted inserted replaced
1628:3621f486ce72 1629:438561303d02
112 } 112 }
113 113
114 114
115 // Time, represented as counts of microseconds since the epoch 115 // Time, represented as counts of microseconds since the epoch
116 116
117 var time_format = "%c";
118
117 function showTime(tm) { 119 function showTime(tm) {
118 var newDate = new Date(); 120 return strftime(time_format, tm);
119 newDate.setTime(tm / 1000); 121 }
120 var r = newDate.toUTCString(); 122
121 return r; 123 function showTimeHtml(tm) {
124 return eh(showTime(tm));
122 } 125 }
123 126
124 function now() { 127 function now() {
125 return (new Date()).getTime() * 1000; 128 return (new Date()).getTime() * 1000;
126 } 129 }