nitpicking date format
Adrian Buehlmann
adrian at cadifra.com
Fri Apr 29 02:03:07 CDT 2011
On 2011-04-29 05:53, Kevin Grover wrote:
> On Thu, Apr 28, 2011 at 10:02, Adrian Buehlmann <adrian at cadifra.com
> <mailto:adrian at cadifra.com>> wrote:
>
> On 2011-04-28 18:42, Adrian Buehlmann wrote:
> > (forwarding this to the list, got it in private email)
> >
> > On 2011-04-28 18:26, Ben wrote:
> >> Hi Adrian,
> >>
> >> Sorry for replying off-band, I'm not at work, and cannot respond
> >> conveniently to your mail.
> >>
> >>>
> >>> Another (possibly nitpickish) thing I started wondering (sorry for
> >>> mentioning this late):
> >>> Would it make sense to have the dates inside the html page in
> >>> isodatesec format or similar (e.g. "2009-08-18 13:00:13 +0200", see
> >>> 'hg help templating') instead of the current (example) "Tue Apr 26
> >>> 14:42:14 2011 +0200"?
> >>> isodatesec looks like it might be a bit easier to parse and it's
> even
> >>> a little bit shorter (5 bytes per date).
> >>
> >> No, actually, this wouldn't be handy as Javascript is directly
> parsing
> >> the "Tue Apr 26 14:42:14 2011
> >> +0200". The other date format would mean extra parsing work. And that
> >> "Tue Apr 26 14:42:14 2011
> >> +0200" has already been there since the beginning at most of the
> places
> >> (see changeset description).
> >>
> >> About your bandwidth concern at those places (changeset
> description), we
> >> are actually winning bytes by not transferring the "(XXX ago)"
> over the
> >> link, but generating it locally.
> >>
> >> I will send an updated patch tomorrow morning when arriving at work.
>
> Hmm. I tried entering:
>
> <paste>
> var once = new Date('2009-08-18 13:00:13 +0200');
> document.write(once.toString());
> </paste>
>
> at http://writecodeonline.com/javascript/ and it seemed to work fine.
>
> The result was:
>
> "Tue Aug 18 2009 13:00:13 GMT+0200 (W. Europe Daylight Time)"
>
> Funny, all I get is 'Invalid Date'
WTF?
I forgot to mention that for my first experiment I used Google Chrome
version 11.0.696.57. There I got that
"Tue Aug 18 2009 13:00:13 GMT+0200 (W. Europe Daylight Time)"
But you are indeed right for IE9, and Firefox 4. With these I get
"Invalid Date"
So, should I say "WTF Google?" Or does writecodeonline.com play some
evil tricks on me??
Anyway. My date format nitpick is hereby dismissed.
More information about the Mercurial-devel
mailing list