mirror of
https://github.com/chronotope/chrono.git
synced 2025-10-02 07:21:41 +00:00
Remove deprecated methods from documentation
This commit is contained in:
parent
3e6fa4c0df
commit
cf17f7a239
@ -260,7 +260,7 @@
|
||||
//! # }
|
||||
//! ```
|
||||
//!
|
||||
//! Parsing can be done with three methods:
|
||||
//! Parsing can be done with two methods:
|
||||
//!
|
||||
//! 1. The standard [`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait
|
||||
//! (and [`parse`](https://doc.rust-lang.org/std/primitive.str.html#method.parse) method
|
||||
@ -278,12 +278,6 @@
|
||||
//! [`DateTime::parse_from_rfc3339`](./struct.DateTime.html#method.parse_from_rfc3339)
|
||||
//! are similar but for well-known formats.
|
||||
//!
|
||||
//! 3. [`Offset::datetime_from_str`](./offset/trait.TimeZone.html#method.datetime_from_str) is
|
||||
//! similar but returns `DateTime` of given offset.
|
||||
//! When the explicit offset is missing from the input, it simply uses given offset.
|
||||
//! It issues an error when the input contains an explicit offset different
|
||||
//! from the current offset.
|
||||
//!
|
||||
//! More detailed control over the parsing process is available via
|
||||
//! [`format`](./format/index.html) module.
|
||||
//!
|
||||
|
@ -1556,7 +1556,7 @@ impl Datelike for NaiveDate {
|
||||
/// assert_eq!(NaiveDate::from_ymd_opt(-308, 3, 14).unwrap().day(), 14);
|
||||
/// ```
|
||||
///
|
||||
/// Combined with [`NaiveDate::pred`](#method.pred),
|
||||
/// Combined with [`NaiveDate::pred_opt`](#method.pred_opt),
|
||||
/// one can determine the number of days in a particular month.
|
||||
/// (Note that this panics when `year` is out of range.)
|
||||
///
|
||||
@ -1613,7 +1613,7 @@ impl Datelike for NaiveDate {
|
||||
/// assert_eq!(NaiveDate::from_ymd_opt(-308, 3, 14).unwrap().ordinal(), 74);
|
||||
/// ```
|
||||
///
|
||||
/// Combined with [`NaiveDate::pred`](#method.pred),
|
||||
/// Combined with [`NaiveDate::pred_opt`](#method.pred_opt),
|
||||
/// one can determine the number of days in a particular year.
|
||||
/// (Note that this panics when `year` is out of range.)
|
||||
///
|
||||
|
@ -423,8 +423,7 @@ pub trait TimeZone: Sized + Clone {
|
||||
/// Makes a new `DateTime` from the number of non-leap nanoseconds
|
||||
/// since January 1, 1970 0:00:00 UTC (aka "UNIX timestamp").
|
||||
///
|
||||
/// Unlike [`timestamp_millis`](#method.timestamp_millis), this never
|
||||
/// panics.
|
||||
/// Unlike [`timestamp_millis_opt`](#method.timestamp_millis_opt), this never fails.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
|
@ -97,7 +97,7 @@ const fn span_for_digits(digits: u16) -> u32 {
|
||||
///
|
||||
/// # Limitations
|
||||
/// Both rounding and truncating are done via [`Duration::num_nanoseconds`] and
|
||||
/// [`DateTime::timestamp_nanos`]. This means that they will fail if either the
|
||||
/// [`DateTime::timestamp_nanos_opt`]. This means that they will fail if either the
|
||||
/// `Duration` or the `DateTime` are too big to represented as nanoseconds. They
|
||||
/// will also fail if the `Duration` is bigger than the timestamp.
|
||||
pub trait DurationRound: Sized {
|
||||
|
Loading…
x
Reference in New Issue
Block a user