From 7308fb80b623e1891919a25153ef6252e50132c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 27 Oct 2016 19:22:24 +0200 Subject: [PATCH 1/2] evalutils: add new add_days(date, count) function (#13782) --- wcs/qommon/evalutils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcs/qommon/evalutils.py b/wcs/qommon/evalutils.py index 0e6d1f9..248ae03 100644 --- a/wcs/qommon/evalutils.py +++ b/wcs/qommon/evalutils.py @@ -108,3 +108,7 @@ def age_in_seconds(born, today=None): today = datetime.datetime.now() today = make_datetime(today) return datetime_delta(today, born).total_seconds() + +def add_days(date, count): + '''Add the given number of days to date''' + return make_date(date) + datetime.timedelta(days=count) -- 2.10.1