<ahref="http://maven.apache.org/"title="Built by Maven"class="poweredBy">
<imgclass="poweredBy"alt="Built by Maven"src="../images/logos/maven-feather.png"/>
</a>
</div>
</div>
<divid="bodyColumn">
<divid="contentBox">
<divclass="section">
<h2>Feeds Date Elements Mapping to SyndFeed and SyndEntry<aname="Feeds_Date_Elements_Mapping_to_SyndFeed_and_SyndEntry"></a></h2>
<p>The different RSS versions and Atom define different date elements at feed and entry level. Some of them also define syndication information indicating when (and when not) and how often to fetch feeds for updates. There is not always a possible mapping or conversion of this information when going from one format to another.</p>
<p>As this is still subject of debate (<aclass="externalLink"href="http://www.tbray.org/ongoing/When/200x/2004/07/30/Dates">How About a Date</a> and <aclass="externalLink"href="http://www.intertwingly.net/wiki/pie/DateSurvey">Date Survey</a>), for now, in Rss and atOM utilitiEs (ROME) we've taken a simplistic approach.</p>
<p>When handling feeds at WireFeed level, <tt>rss.Channel</tt> or <tt>atom.Feed</tt>, it is possible to access all the date elements and syndication information available in the feed.</p>
<p>When handling feeds at SyndFeed level, <tt>synd.SyndFeed</tt>, there is only one date element available, the <tt>publishedDate</tt>. Both, <tt>SyndFeed</tt> and <tt>SyndEntry</tt> have the <tt>publisheDate</tt> property. In addition, it is possible to use the Syndication Module.</p>
<p>The mapping of the date elements from the different feed formats to SyndFeed is as follows.</p>
<divclass="section">
<h3>For RSS 0.90<aname="For_RSS_0.90"></a></h3>
<p>RSS 0.90 does not define date elements.</p>
<p>There is no mapping to <tt>SyndFeed</tt> and <tt>SyndEntry</tt> date properties.</p></div>
<p>RSS 0.91 and 0.92 define <tt>pubDate</tt> and <tt>lastBuildDate</tt> at feed level.</p>
<p>The feed <tt>pubDate</tt> element is mapped to the <tt>SyndFeed</tt><tt>publishedDate</tt> property. The <tt>lastBuildDate</tt> element is lost.</p></div>
<divclass="section">
<h3>For RSS 0.93, 0.94 and 2.0<aname="For_RSS_0.93_0.94_and_2.0"></a></h3>
<p>RSS 0.93, 0.94 and 2.0 define <tt>pubDate</tt> and <tt>lastBuildDate</tt> at feed level. They also define <tt>pubDate</tt> and <tt>expirationDate</tt> at item level.</p>
<p>The feed <tt>pubDate</tt> element is mapped to the <tt>SyndFeed</tt><tt>publishedDate</tt> property. The <tt>lastBuildDate</tt> element is lost.</p>
<p>The item <tt>pubDate</tt> element is mapped to the <tt>SyndEntry</tt><tt>publishedDate</tt> property. The <tt>expirationDate</tt> element is lost.</p></div>
<divclass="section">
<h3>For RSS 1.0<aname="For_RSS_1.0"></a></h3>
<p>RSS 1.0 use DC Module data at feed an item level to indicate date information about the feed and the items.</p>
<p><tt>SyndFeed</tt> and <tt>SyndEntry</tt> use the DC Module <tt>date</tt> element for the <tt>publishedDate</tt> property.</p></div>
<divclass="section">
<h3>For Atom 0.3<aname="For_Atom_0.3"></a></h3>
<p>Atom 0.3 defines a <tt>modified</tt> element at feed level and the <tt>modified</tt>, <tt>created</tt>&<tt>issued</tt> elements at entry level.</p>
<p>The feed <tt>modified</tt> element is mapped to the <tt>SyndFeed</tt><tt>publishedDate</tt> property.</p>
<p>The item <tt>modified</tt> element is mapped to the <tt>SyndEntry</tt><tt>publishedDate</tt> property. The entry elements, <tt>created</tt> and <tt>issued</tt>, are lost.</p></div>
<divclass="section">
<h3>For Atom 1.0<aname="For_Atom_1.0"></a></h3>
<p>(Atom 1.0 supported in ROME since v0.8)</p>
<p>Atom 1.0 defines an <tt>updated</tt> element at the feed level, which ROME maps to <tt>SyndFeed.publishedDate</tt>.</p>
<p>Atom 1.0 defines <tt>updated</tt> and <tt>published</tt> elements at the entry level, which ROME maps to <tt>SyndEntry.updatedDate</tt> and <tt>SyndEntry.publishedDate</tt> respectively.</p></div></div>