Skip to main content
XMLDir

Search 309 pages — tools, formats, elements, namespaces, directory, comparisons, XPath, datatypes, glossary, parse errors, schema errors, use cases, blog and product.

RSS 2.0

<pubDate>

When an item was published, in RFC 822 — the date format that is not ISO 8601, and is the most common thing wrong in a feed.

RSS dates follow RFC 822 as updated by RFC 1123: "Mon, 10 Aug 2026 09:00:00 GMT". An ISO 8601 value like 2026-08-10T09:00:00Z is what most template engines emit by default and is not valid here — Atom is the format that wants that one.

Readers that parse strictly ignore a malformed date entirely, which usually shows up as items appearing in the wrong order or dated to the epoch rather than as an error anybody sees.

Format
RSS 2.0
Namespace
None — RSS elements are unqualified
Parent
<item>
How many
At most one per <item>.

What it contains

Nothing — this element holds a value rather than other elements. Its content is text, and the constraints below are what that text has to be.

Cardinality and constraints

At most one per <item>.

  • RFC 822 with a four-digit year: "Mon, 10 Aug 2026 09:00:00 GMT".
  • The day name and the timezone are both part of the format.
  • ISO 8601 is not accepted here, however reasonable it looks.

What our validator does

Every pubDate is matched against the RFC 822 pattern, and the count that fail is reported as a warning with an example of the correct form.

Broken and fixed

Both documents below are well-formed XML — that is the point of this corpus — and both are run through the validator on every test run. The verdicts here are what it returned, not what we expect it to.

broken
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Example</title>
    <link>https://example.com/</link>
    <description>Notes from the example farm.</description>
    <item>
      <title>Hen lays egg</title>
      <guid>https://example.com/egg</guid>
      <pubDate>2026-08-10T09:00:00Z</pubDate>
    </item>
  </channel>
</rss>
1 <pubDate> value is not RFC 822 (e.g. "Mon, 20 Jul 2026 09:00:00 GMT"). Readers that parse strictly will ignore them.
fixed
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Example</title>
    <link>https://example.com/</link>
    <description>Notes from the example farm.</description>
    <atom:link href="https://example.com/feed.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>Hen lays egg</title>
      <link>https://example.com/egg</link>
      <guid>https://example.com/egg</guid>
      <pubDate>Mon, 10 Aug 2026 09:00:00 GMT</pubDate>
    </item>
  </channel>
</rss>
No errors. Warnings may remain — a conforming feed can still be missing a self link — but nothing here is wrong.

Get started

Bring order to the XML your team can't afford to ignore.

Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.