Closed eminence closed 7 years ago
After a little more research, the day
field is defined as (via RFC2822 section 3.3):
day = ([FWS] 1*2DIGIT FWS) / obs-day
I had to look up this notational format in RFC 2234 to find that it means this:
The operator "*" preceding an element indicates repetition. The full
form is:
<a>*<b>element
where <a> and <b> are optional decimal values, indicating at least
<a> and at most <b> occurrences of element.
So RFC2822 (and RFC5322) allow for a single-digit date.
Aha! I was reading that ABNF as if 2DIGIT
was a single token, and so there could be only a single 2DIGIT
. I will make the change.
I just put together a quick PR for this issue, if you want it
Chrono's
to_rfc2822
method will return a date string like the following:This is unparseable by email-format, seemingly because the single digit (
8
) for the day-of-month:I've been reading RFC2822, and do be honest I can't tell if a single-digit field is allowed. Do you think this is a email-format parsing problem? Or a Chrono formatting problem?