tweetchive in IE9

Cross-platform Javascript has gotten a whole lot better in the HTML5 era. I developed all of Tweetchive without testing it at all in anything other than Chrome. It just worked in Firefox and Safari and Mobile Safari. IE9 still takes a bit of work, had to make two changes:

  • Added <!DOCTYPE html>. Other browsers don’t care, but IE9 runs in quirks mode without this and leaves out useful things like the JSON functions.
  • Dropped in Moment.js to parse dates. new Date(“some random localized string”) does a good job of parsing dates in most browsers, but not in IE.
    moment(fullTweet.created_at, “ddd MMM DD HH:mm:ss Z YYYY”).valueOf()