An Atom item can reply to updated even though its value is nil, so
check for it actually being valued instead. Also, some malformed Atom
feeds use the nonstandard 'modified' element instead, so check for that
too.
date = \
if opts[:date]
- if item.respond_to?(:updated)
+ if item.respond_to?(:updated) and item.updated
make_date(item.updated.content)
+ elsif item.respond_to?(:modified) and item.modified
+ make_date(item.modified.content)
elsif item.respond_to?(:source) and item.source.respond_to?(:updated)
make_date(item.source.updated.content)
elsif item.respond_to?(:pubDate)