From 77f11be33293026fb50a98add5b379cff50a19d2 Mon Sep 17 00:00:00 2001 From: IcyTide <34438949+IcyTide@users.noreply.github.com> Date: Thu, 29 Jan 2026 11:50:46 +0800 Subject: [PATCH] Add __le__ method for less than or equal comparison --- skyfield/timelib.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/skyfield/timelib.py b/skyfield/timelib.py index a82ffadd..3410d0ee 100644 --- a/skyfield/timelib.py +++ b/skyfield/timelib.py @@ -920,6 +920,9 @@ def __lt__(self, other): return ((self.tt_fraction - other.tt_fraction) + (self.whole - other.whole)) < 0 + def __le__(self, other): + return self == other or self < other + def __add__(self, other_time): if isinstance(other_time, timedelta): w = other_time.days