Parsing a RFC2822 date from Chrono #20
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mikedilger/email-format#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Chrono's
to_rfc2822method 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?
After a little more research, the
dayfield is defined as (via RFC2822 section 3.3):I had to look up this notational format in RFC 2234 to find that it means this:
So RFC2822 (and RFC5322) allow for a single-digit date.
Aha! I was reading that ABNF as if
2DIGITwas a single token, and so there could be only a single2DIGIT. I will make the change.I just put together a quick PR for this issue, if you want it