ZF-6931: Zend_Date::RFC_822 format does not accept four digit years.

Description

When using RFC 822 format Zend_Date throws an exeption when the provided date has the year in four-digit format. RSS specifies that it uses RFC 822 and at the moment most RSS feeds are using four digits for the year e.g. the feeds on http://framework.zend.com. It should be changed to accept 2 or 4 digits.

Comments

Line 2259 is changed to accept 2 or 4 digit years.

svn diff between patch and ZF 1.8.2 Date.php

RFC822 defines that the year value must have 2 digits. 4 digits are not allowed for RFC822.

From the RSS specification at http://cyber.law.harvard.edu/rss/rss.html: "All date-times in RSS conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred)."

This means clearly that the RSS date DOES NOT CONFORM RFC 822.

You should use RSS instead of RFC_822 when you want to detect RSS feed dates.

Thomas, right you are. Then I would like that the reference guide be changed to note this. On the page http://framework.zend.com/manual/en/… the pubDate is stated to be RFC 822 format. It should be noted that it is actually not and that Zend_Date::RSS should be used.