Minor doc wording changes.
This commit is contained in:
parent
7e2f2e0bea
commit
532c025a77
|
@ -300,8 +300,8 @@
|
|||
//! to get the number of additional number of nanoseconds.
|
||||
//!
|
||||
//! ```rust
|
||||
//! use chrono::DateTime;
|
||||
//! use chrono::Utc;
|
||||
//! # use chrono::DateTime;
|
||||
//! # use chrono::Utc;
|
||||
//! // We need the trait in scope to use Utc::timestamp().
|
||||
//! use chrono::TimeZone;
|
||||
//!
|
||||
|
@ -309,7 +309,7 @@
|
|||
//! let dt = Utc.timestamp(1500000000, 0);
|
||||
//! assert_eq!(dt.to_rfc2822(), "Fri, 14 Jul 2017 02:40:00 +0000");
|
||||
//!
|
||||
//! // from a datetime:
|
||||
//! // Get epoch value from a datetime:
|
||||
//! let dt = DateTime::parse_from_rfc2822("Fri, 14 Jul 2017 02:40:00 +0000").unwrap();
|
||||
//! assert_eq!(dt.timestamp(), 1500000000);
|
||||
//! ```
|
||||
|
|
Loading…
Reference in New Issue