rust-syndication / rss

Library for serializing the RSS web content syndication format
https://crates.io/crates/rss
Apache License 2.0
419 stars 52 forks source link

Add dc:date item field to pubDate field #116

Closed ayrat555 closed 3 years ago

ayrat555 commented 3 years ago

Some RSS 1.0 feeds have dc:date which contains item publication date, rss library saves this field to dates.

Can it be saved to pubDate?

example https://assets.wor.jp/rss/rdf/sankei/world.rdf

andy128k commented 3 years ago

It is not really possible to do this properly. According to the spec dc:date can be not just a date but a range or partial date (e.g. year only).

ayrat555 commented 3 years ago

Can it be used only if dc:date has a single date?

andy128k commented 3 years ago

Such indirect logic will introduce complexity and ambiguity, Look at this not from the point of parsing of a given feed, but from the point of authoring one.

Should changing of dc:date also modify pubDate? What if pubDate is already set? Should it be overwritten?

ayrat555 commented 3 years ago

@andy128k thanks