Skip to content

Commit

Permalink
Merge pull request #2386 from davidhewitt/datetime-docs
Browse files Browse the repository at this point in the history
datetime: remove reference to leap seconds
  • Loading branch information
davidhewitt committed May 19, 2022
2 parents e16dad3 + 82b26b7 commit 4869052
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/types/datetime.rs
Expand Up @@ -153,9 +153,9 @@ pub trait PyTimeAccess {
/// Returns whether this date is the later of two moments with the
/// same representation, during a repeated interval.
///
/// This typically occurs at the end of daylight savings time, or during
/// leap seconds. Only valid if the represented time is ambiguous. See
/// [PEP 495](https://www.python.org/dev/peps/pep-0495/) for more detail.
/// This typically occurs at the end of daylight savings time. Only valid if the
/// represented time is ambiguous.
/// See [PEP 495](https://www.python.org/dev/peps/pep-0495/) for more detail.
#[cfg(not(PyPy))]
fn get_fold(&self) -> bool;
}
Expand Down Expand Up @@ -267,7 +267,12 @@ impl PyDateTime {
}

/// Alternate constructor that takes a `fold` parameter. A `true` value for this parameter
/// signifies a leap second
/// signifies this this datetime is the later of two moments with the same representation,
/// during a repeated interval.
///
/// This typically occurs at the end of daylight savings time. Only valid if the
/// represented time is ambiguous.
/// See [PEP 495](https://www.python.org/dev/peps/pep-0495/) for more detail.
#[cfg(not(PyPy))]
#[allow(clippy::too_many_arguments)]
pub fn new_with_fold<'p>(
Expand Down Expand Up @@ -413,7 +418,7 @@ impl PyTime {
}

#[cfg(not(PyPy))]
/// Alternate constructor that takes a `fold` argument
/// Alternate constructor that takes a `fold` argument. See [`PyDateTime::new_with_fold`].
pub fn new_with_fold<'p>(
py: Python<'p>,
hour: u8,
Expand Down

0 comments on commit 4869052

Please sign in to comment.