From 2a97849af239844bc8e0fbea3daef24deb9f9614 Mon Sep 17 00:00:00 2001 From: Don Cross Date: Sat, 22 Jun 2019 21:35:48 -0400 Subject: [PATCH] Python: Implemented AddDays function. --- generate/template/astronomy.py | 3 +++ source/python/astronomy.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/generate/template/astronomy.py b/generate/template/astronomy.py index 605a5b1e..3d25a289 100644 --- a/generate/template/astronomy.py +++ b/generate/template/astronomy.py @@ -160,6 +160,9 @@ class astro_time_t: self.ut = ut self.tt = _TerrestrialTime(ut) + def AddDays(self, days): + return astro_time_t(self.ut + days) + _EPOCH = datetime.datetime(2000, 1, 1, 12) def CurrentTime(): diff --git a/source/python/astronomy.py b/source/python/astronomy.py index cc774c49..651cdcf8 100644 --- a/source/python/astronomy.py +++ b/source/python/astronomy.py @@ -251,6 +251,9 @@ class astro_time_t: self.ut = ut self.tt = _TerrestrialTime(ut) + def AddDays(self, days): + return astro_time_t(self.ut + days) + _EPOCH = datetime.datetime(2000, 1, 1, 12) def CurrentTime():