[PATCH stable] hgweb: fix dynamic date calculation not working under Safari
laurens.nospam at grauw.nl
Mon Oct 24 18:22:29 CDT 2011
Op 24-10-2011 21:02, Brodie Rao schreef:
> While Chrome, Firefox, and IE 6+ support the current date format being
> passed to Date(), Safari doesn't:
>> new Date('Mon Oct 24 13:58:01 2011 +0200')
> Invalid Date
> However, the rfc3339date format does work:
>> new Date('2011-10-24T13:58:01+02:00')
> Mon Oct 24 2011 04:58:01 GMT-0700 (PDT)
> This change adds a new data-date attribute to all age/date elements in
> each theme. If process_dates() sees an age element with that
> attribute, it'll prefer it over using the element's text content.
> Tested in IE 6, Safari 5.1.1, Google Chrome 15, and Firefox 6.0.1.
(section 126.96.36.199) and will not work in all browsers. I can’t give you a
implementation can not parse it. To be honest I thought IE would have a
problem with it as well (but I guess not).
Either way, the most compatible date parsing format is RFC822 used in ES3:
Mon, 25 Dec 1995 13:30:00 GMT+0430
I would recommend you use this one.
~~ Ushiko-san! Kimi wa doushite, Ushiko-san nan da!! ~~
Laurens Holst, developer, Utrecht, the Netherlands
Website: www.grauw.nl. Working @ www.roughcookie.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4332 bytes
Desc: S/MIME cryptografische ondertekening
More information about the Mercurial-devel