Skip to content

Commit

Permalink
#1577: Changed years_since documentation to match its implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Taxalo authored and pitdicker committed Apr 29, 2024
1 parent 352a352 commit 7e25ffb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/datetime/mod.rs
Expand Up @@ -594,7 +594,7 @@ impl<Tz: TimeZone> DateTime<Tz> {
///
/// # Errors
///
/// Returns `None` if `base < self`.
/// Returns `None` if `base > self`.
#[must_use]
pub fn years_since(&self, base: Self) -> Option<u32> {
let mut years = self.year() - base.year();
Expand Down
2 changes: 1 addition & 1 deletion src/naive/date/mod.rs
Expand Up @@ -1136,7 +1136,7 @@ impl NaiveDate {
///
/// # Errors
///
/// Returns `None` if `base < self`.
/// Returns `None` if `base > self`.
#[must_use]
pub const fn years_since(&self, base: Self) -> Option<u32> {
let mut years = self.year() - base.year();
Expand Down

0 comments on commit 7e25ffb

Please sign in to comment.