From 80885d86e27561ac68ea48b496cf7749ddca812d Mon Sep 17 00:00:00 2001 From: Pavel Pscheidl Date: Mon, 12 Sep 2022 16:21:57 +0200 Subject: [PATCH] docs: Simplify documentation for NaiveDateTime::from_timestamp_millis --- src/naive/datetime/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/naive/datetime/mod.rs b/src/naive/datetime/mod.rs index cbf7b57522..9a4f0c7af9 100644 --- a/src/naive/datetime/mod.rs +++ b/src/naive/datetime/mod.rs @@ -126,12 +126,11 @@ impl NaiveDateTime { let datetime = NaiveDateTime::from_timestamp_opt(secs, nsecs); datetime.expect("invalid or out-of-range datetime") } - - /// Makes a new `NaiveDateTime` corresponding to a UTC date and time, - /// from the number of milliseconds - /// since the midnight UTC on January 1, 1970 (aka "UNIX timestamp"). + /// Creates a new [NaiveDateTime] from milliseconds since UNIX Epoch. + /// + /// UNIX epoch starts on midnight, January 1, 1970, UTC. /// - /// Returns `None` on the out-of-range number of milliseconds and/or invalid nanosecond. + /// Returns `None` on an out-of-range number of milliseconds. /// /// # Example ///