Skip to content

Commit

Permalink
Replace DurationExceedsTimestamp example with a note.
Browse files Browse the repository at this point in the history
  • Loading branch information
joroKr21 committed Feb 2, 2024
1 parent 2ac33e7 commit 23f4944
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,7 @@ where
pub enum RoundingError {
/// Error when the Duration exceeds the Duration from or until the Unix epoch.
///
/// ``` rust
/// # use chrono::{DurationRound, Duration, RoundingError, TimeZone, Utc};
/// let dt = Utc.with_ymd_and_hms(1970, 12, 12, 0, 0, 0).unwrap();
///
/// assert_eq!(
/// dt.duration_round(Duration::days(365)),
/// Err(RoundingError::DurationExceedsTimestamp),
/// );
/// ```
/// Note: this error is not produced anymore.
DurationExceedsTimestamp,

/// Error when `Duration.num_nanoseconds` exceeds the limit.
Expand Down

0 comments on commit 23f4944

Please sign in to comment.