corporate win--their requirements

Christopher A. Aillon caillon at returnzero.com
Sat Sep 28 20:59:44 UTC 2002


Gervase Markham wrote:
> The problem with that is that I don't want every comment in my Bugzilla 
> bug to have a timestamp of the form:
> Mon 01 Jan 1990 12:00:00 AM BST
> 
> Ideally, we'd keep using the current, international
> 2002-08-04 11:43
> form. But JavaScript's Date object doesn't have an equivalent of 
> time2str(), where you can supply a format.
> 
> Maybe (probably) I'm missing something here. If you can provide some JS 
> that turns 1000001234 (server side secs-since-Jan-1970 value) to a 
> client-side 2002-03-03 11:43 , I'll be pleased and impressed.

var d = new Date(1017859380000);
var mar32k2 = d.getFullYear() + "-" + d.getMonth() + "-" + d.getDay();
var elevenFortyThree = d.toLocaleTimeString(); // 11:43:00 AM
// elevenFortyThree = d.getHours() + ":" + d.getMinutes(); // 11:43
var impressive = mar32k2 + " " + elevenFortyThree;


> It still won't necessarily make it the right thing to do, though. For 
> example, we need to evaluate the effect of a load of scattered 
> document.write()s on the page display time of a large bug with many 
> comments. I _believe_ the presence of document.write() means rendering 
> has to be delayed on Mozilla, but I could be wrong about that.

Don't use document.write.  Use the DOM to manipulate existing pages.  I made a 
post about this earlier in the thread.

> 
> Gerv
> 
> ----
> To view or change your list settings, click here:
> <http://bugzilla.org/cgi-bin/mj_wwwusr?user=caillon@returnzero.com>
> 
> 




More information about the developers mailing list