MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / farthest

Method farthest

src/pendulum/datetime.py:503–509  ·  view source on GitHub ↗

Get the farthest date from the instance.

(self, *dts: datetime.datetime)

Source from the content-addressed store, hash-verified

501 return min((abs(self - dt), dt) for dt in pdts)[1]
502
503 def farthest(self, *dts: datetime.datetime) -> Self: # type: ignore[override]
504 """
505 Get the farthest date from the instance.
506 """
507 pdts = [self.instance(x) for x in dts]
508
509 return max((abs(self - dt), dt) for dt in pdts)[1]
510
511 def is_future(self) -> bool:
512 """

Callers

nothing calls this directly

Calls 1

instanceMethod · 0.95

Tested by

no test coverage detected