Jarno who says we shouldn’t use the timestamp in RSS feeds to sort the entries, also invites us to disagree. And I disagree. People keep forgetting that RSS pre-dates blogging, and is used for other tasks this pushing headlines to a desktop aggregator. Wish people would stop trying to limit us all because they lose sight of the bigger picture (as was done with Atom in my opinion) or are working with a poorly thought out spec. (Userland RSS) Just for the record, I’ve included below the algorithm I used to sort items into a collated list in one of my aggregators.

  • check for a dc:date or pubDate per item, and assign the item that as its pub/mod date. (unfortunately for me, the handful of feeds published in Userland RSS I was aggregating were confused by the lastBuildDate tag, using it to keep track of the last build date for an item or a channel, instead of the item’s modification date, making it largely useless)
  • otherwise, attempt to a certain the most recent publish time of the feed, by either looking at the channel’s dc:date, or the channel’s pubDate, and use that as the pub/mod time for all newly seen items.
  • This has some nice features. Like, depending on how smart your aggregator is, it could do the right thing with the upcoming RSS feeds, even though they don’t use mod_event. (note to self, send Andy a note about that)