John Resig’s prettyDate() function works fine in Chrome and Safari, but returns “undefined” in Firefox and Internet Explorer.
See it for yourself: http://jsfiddle.net/A3DAe/
Why is that?
(NB: Note that the timestring is the one provided by the Twitter api. )
It’s because that regex to “fix” the time is erroneous.
should be
The character class
[TZ]in the broken version was turning “Thu” into “hu”. I guess Firefox is just more picky about RFC 2822 dates.edit — I’m not sure that what that’s trying to do is remove the time zone (“TZ”) delimiter, but I assume it is.