From 2165b15f8f90f6648abe1c69c8358aea5878dc5f Mon Sep 17 00:00:00 2001 From: Roland Fredenhagen Date: Tue, 1 Mar 2022 09:49:05 +0100 Subject: [PATCH] change UTC::now() documentation to "date and time" (#647) --- CHANGELOG.md | 2 ++ src/offset/local.rs | 4 ++-- src/offset/utc.rs | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1458b019d6..e8331cefb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ Versions with only mechanical changes will be omitted from the following list. * Implement `DurationRound` for `NaiveDateTime` * Correct build for wasm32-unknown-emscripten target * Add `DateTime::from_local()` to construct from given local date and time (#572) +* Correct build for wasm32-unknown-emscripten target (#568) +* Change `Local::now()` and `Utc::now()` documentation from "current date" to "current date and time" (#647) ## 0.4.19 diff --git a/src/offset/local.rs b/src/offset/local.rs index 8ee5848b5e..deb3d681fe 100644 --- a/src/offset/local.rs +++ b/src/offset/local.rs @@ -96,13 +96,13 @@ impl Local { Local::now().date() } - /// Returns a `DateTime` which corresponds to the current date. + /// Returns a `DateTime` which corresponds to the current date and time. #[cfg(not(all(target_arch = "wasm32", not(target_os = "wasi"), feature = "wasmbind")))] pub fn now() -> DateTime { tm_to_datetime(Timespec::now().local()) } - /// Returns a `DateTime` which corresponds to the current date. + /// Returns a `DateTime` which corresponds to the current date and time. #[cfg(all(target_arch = "wasm32", not(target_os = "wasi"), feature = "wasmbind"))] pub fn now() -> DateTime { use super::Utc; diff --git a/src/offset/utc.rs b/src/offset/utc.rs index aff86073d2..b094e57c4d 100644 --- a/src/offset/utc.rs +++ b/src/offset/utc.rs @@ -42,7 +42,7 @@ impl Utc { Utc::now().date() } - /// Returns a `DateTime` which corresponds to the current date. + /// Returns a `DateTime` which corresponds to the current date and time. #[cfg(not(all(target_arch = "wasm32", not(target_os = "wasi"), feature = "wasmbind")))] pub fn now() -> DateTime { let now = @@ -51,7 +51,7 @@ impl Utc { DateTime::from_utc(naive, Utc) } - /// Returns a `DateTime` which corresponds to the current date. + /// Returns a `DateTime` which corresponds to the current date and time. #[cfg(all(target_arch = "wasm32", not(target_os = "wasi"), feature = "wasmbind"))] pub fn now() -> DateTime { let now = js_sys::Date::new_0();