From 57c98a409e8b9eac534d5526495fb80325ed8c9a Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Mon, 9 Oct 2017 14:47:07 +0300 Subject: [PATCH] Added underscores on long numbers. --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index db404d2..0f1b7ce 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -306,13 +306,14 @@ //! use chrono::TimeZone; //! //! // Construct a datetime from epoch: -//! let dt = Utc.timestamp(1500000000, 0); +//! let dt = Utc.timestamp(1_500_000_000, 0); //! assert_eq!(dt.to_rfc2822(), "Fri, 14 Jul 2017 02:40:00 +0000"); //! //! // 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); +//! assert_eq!(dt.timestamp(), 1_500_000_000); //! ``` +//! //! ### Individual date //! //! Chrono also provides an individual date type ([**`Date`**](./struct.Date.html)).