Skip to content

Commit 7e25ffb

Browse files
Taxalopitdicker
authored andcommitted
#1577: Changed years_since documentation to match its implementation
1 parent 352a352 commit 7e25ffb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/datetime/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ impl<Tz: TimeZone> DateTime<Tz> {
594594
///
595595
/// # Errors
596596
///
597-
/// Returns `None` if `base < self`.
597+
/// Returns `None` if `base > self`.
598598
#[must_use]
599599
pub fn years_since(&self, base: Self) -> Option<u32> {
600600
let mut years = self.year() - base.year();

src/naive/date/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ impl NaiveDate {
11361136
///
11371137
/// # Errors
11381138
///
1139-
/// Returns `None` if `base < self`.
1139+
/// Returns `None` if `base > self`.
11401140
#[must_use]
11411141
pub const fn years_since(&self, base: Self) -> Option<u32> {
11421142
let mut years = self.year() - base.year();

0 commit comments

Comments
 (0)