Rfc2822¶
RFC 2822 / 5322 (email date) parsing and formatting. See: https://datatracker.ietf.org/doc/html/rfc5322 (§3.3)
Example: Sun, 25 May 2026 12:00:00 -0700
Accepted on parse:
- Optional day-of-week prefix (3-letter + comma + space); not
validated against the computed day-of-week.
- 1- or 2-digit day-of-month.
- Case-insensitive 3-letter month name.
- 4-digit year.
- HH:MM or HH:MM:SS time.
- Numeric offset +HHMM / -HHMM, or the legacy zone names
UT/GMT/EST/EDT/CST/CDT/MST/MDT/PST/PDT.
- Single space as field separator (FWS / CFWS folding rules from
RFC 5322 §3.2.2 are not implemented in v1).
Emitted on format: the canonical form with day-of-week, 2-digit
day, capital-case 3-letter month, 4-digit year, HH:MM:SS, numeric
offset (+0000 for UTC, never GMT/UT).
Constructors¶
create¶
Returns¶
- Rfc2822 val^
Public Functions¶
parse¶
Parameters¶
- s: String val
Returns¶
- (ZonedDateTime iso^ | ParseError)
parse_in_place¶
Parameters¶
- s: String val
- zdt: ZonedDateTime ref
Returns¶
- (None val | ParseError)
format¶
Parameters¶
- zdt: ZonedDateTime box
Returns¶
- String iso^
format_in_place¶
Parameters¶
- zdt: ZonedDateTime box
- buf: String ref
Returns¶
- None val
is_digit¶
Parameters¶
- c: U8 val
Returns¶
- Bool val
eq¶
Parameters¶
- that: Rfc2822 val
Returns¶
- Bool val
ne¶
Parameters¶
- that: Rfc2822 val
Returns¶
- Bool val