]>
git.proxmox.com Git - rustc.git/blob - vendor/time/src/format_description/well_known/rfc2822.rs
1 //! The format described in RFC 2822.
3 /// The format described in [RFC 2822](https://tools.ietf.org/html/rfc2822#section-3.3).
5 /// Example: Fri, 21 Nov 1997 09:55:06 -0600
8 #[cfg_attr(feature = "parsing", doc = "```rust")]
9 #[cfg_attr(not(feature = "parsing"), doc = "```rust,ignore")]
10 /// # use time::{format_description::well_known::Rfc2822, OffsetDateTime};
11 /// use time_macros::datetime;
13 /// OffsetDateTime::parse("Sat, 12 Jun 1993 13:25:19 GMT", &Rfc2822)?,
14 /// datetime!(1993-06-12 13:25:19 +00:00)
16 /// # Ok::<_, time::Error>(())
19 #[cfg_attr(feature = "formatting", doc = "```rust")]
20 #[cfg_attr(not(feature = "formatting"), doc = "```rust,ignore")]
21 /// # use time::format_description::well_known::Rfc2822;
22 /// # use time_macros::datetime;
24 /// datetime!(1997-11-21 09:55:06 -06:00).format(&Rfc2822)?,
25 /// "Fri, 21 Nov 1997 09:55:06 -0600"
27 /// # Ok::<_, time::Error>(())
29 #[derive(Debug, Clone, Copy, PartialEq, Eq)]