Skip to content

Commit

Permalink
docs: Simplify documentation for NaiveDateTime::from_timestamp_millis
Browse files Browse the repository at this point in the history
  • Loading branch information
Pscheidl committed Sep 12, 2022
1 parent 341ed5a commit 80885d8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/naive/datetime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit 80885d8

Please sign in to comment.