File tree Expand file tree Collapse file tree 4 files changed +5
-12
lines changed Expand file tree Collapse file tree 4 files changed +5
-12
lines changed Original file line number Diff line number Diff line change 260
260
//! # }
261
261
//! ```
262
262
//!
263
- //! Parsing can be done with three methods:
263
+ //! Parsing can be done with two methods:
264
264
//!
265
265
//! 1. The standard [`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait
266
266
//! (and [`parse`](https://doc.rust-lang.org/std/primitive.str.html#method.parse) method
278
278
//! [`DateTime::parse_from_rfc3339`](./struct.DateTime.html#method.parse_from_rfc3339)
279
279
//! are similar but for well-known formats.
280
280
//!
281
- //! 3. [`Offset::datetime_from_str`](./offset/trait.TimeZone.html#method.datetime_from_str) is
282
- //! similar but returns `DateTime` of given offset.
283
- //! When the explicit offset is missing from the input, it simply uses given offset.
284
- //! It issues an error when the input contains an explicit offset different
285
- //! from the current offset.
286
- //!
287
281
//! More detailed control over the parsing process is available via
288
282
//! [`format`](./format/index.html) module.
289
283
//!
Original file line number Diff line number Diff line change @@ -1556,7 +1556,7 @@ impl Datelike for NaiveDate {
1556
1556
/// assert_eq!(NaiveDate::from_ymd_opt(-308, 3, 14).unwrap().day(), 14);
1557
1557
/// ```
1558
1558
///
1559
- /// Combined with [`NaiveDate::pred `](#method.pred ),
1559
+ /// Combined with [`NaiveDate::pred_opt `](#method.pred_opt ),
1560
1560
/// one can determine the number of days in a particular month.
1561
1561
/// (Note that this panics when `year` is out of range.)
1562
1562
///
@@ -1613,7 +1613,7 @@ impl Datelike for NaiveDate {
1613
1613
/// assert_eq!(NaiveDate::from_ymd_opt(-308, 3, 14).unwrap().ordinal(), 74);
1614
1614
/// ```
1615
1615
///
1616
- /// Combined with [`NaiveDate::pred `](#method.pred ),
1616
+ /// Combined with [`NaiveDate::pred_opt `](#method.pred_opt ),
1617
1617
/// one can determine the number of days in a particular year.
1618
1618
/// (Note that this panics when `year` is out of range.)
1619
1619
///
Original file line number Diff line number Diff line change @@ -423,8 +423,7 @@ pub trait TimeZone: Sized + Clone {
423
423
/// Makes a new `DateTime` from the number of non-leap nanoseconds
424
424
/// since January 1, 1970 0:00:00 UTC (aka "UNIX timestamp").
425
425
///
426
- /// Unlike [`timestamp_millis`](#method.timestamp_millis), this never
427
- /// panics.
426
+ /// Unlike [`timestamp_millis_opt`](#method.timestamp_millis_opt), this never fails.
428
427
///
429
428
/// # Example
430
429
///
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ const fn span_for_digits(digits: u16) -> u32 {
97
97
///
98
98
/// # Limitations
99
99
/// Both rounding and truncating are done via [`Duration::num_nanoseconds`] and
100
- /// [`DateTime::timestamp_nanos `]. This means that they will fail if either the
100
+ /// [`DateTime::timestamp_nanos_opt `]. This means that they will fail if either the
101
101
/// `Duration` or the `DateTime` are too big to represented as nanoseconds. They
102
102
/// will also fail if the `Duration` is bigger than the timestamp.
103
103
pub trait DurationRound : Sized {
You can’t perform that action at this time.
0 commit comments