From 36c45f2e02aa7c6d7ecb472c000a0245150c1263 Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Mon, 6 Feb 2017 07:08:19 +0900 Subject: [PATCH] Removed methods deprecated in 0.2. --- src/datetime.rs | 6 ------ src/naive/datetime.rs | 21 --------------------- 2 files changed, 27 deletions(-) diff --git a/src/datetime.rs b/src/datetime.rs index 62bb55c..7fddf5f 100644 --- a/src/datetime.rs +++ b/src/datetime.rs @@ -99,12 +99,6 @@ impl DateTime { self.datetime.timestamp_subsec_nanos() } - /// *Deprecated*: Same to `DateTime::timestamp`. - #[inline] - pub fn num_seconds_from_unix_epoch(&self) -> i64 { - self.timestamp() - } - /// Retrieves an associated offset from UTC. #[inline] pub fn offset<'a>(&'a self) -> &'a Tz::Offset { diff --git a/src/naive/datetime.rs b/src/naive/datetime.rs index b60a565..249659e 100644 --- a/src/naive/datetime.rs +++ b/src/naive/datetime.rs @@ -144,20 +144,6 @@ impl NaiveDateTime { } } - /// Same to [`NaiveDateTime::from_timestamp`](#method.from_timestamp). - #[inline] - #[deprecated(since = "0.2.0", note = "Renamed to `from_timestamp`")] - pub fn from_num_seconds_from_unix_epoch(secs: i64, nsecs: u32) -> NaiveDateTime { - NaiveDateTime::from_timestamp(secs, nsecs) - } - - /// Same to [`NaiveDateTime::from_timestamp_opt`](#method.from_timestamp_opt). - #[inline] - #[deprecated(since = "0.2.0", note = "Renamed to `from_timestamp_opt`")] - pub fn from_num_seconds_from_unix_epoch_opt(secs: i64, nsecs: u32) -> Option { - NaiveDateTime::from_timestamp_opt(secs, nsecs) - } - /// Parses a string with the specified format string and returns a new `NaiveDateTime`. /// See the [`format::strftime` module](../../format/strftime/index.html) /// on the supported escape sequences. @@ -341,13 +327,6 @@ impl NaiveDateTime { self.time.nanosecond() } - /// Same to [`NaiveDateTime::timestamp`](#method.timestamp). - #[inline] - #[deprecated(since = "0.2.0", note = "Renamed to `timestamp`")] - pub fn num_seconds_from_unix_epoch(&self) -> i64 { - self.timestamp() - } - /// Adds given `Duration` to the current date and time. /// /// As a part of Chrono's [leap second handling](../time/index.html#leap-second-handling),