Commit 3d311ddf authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

FIX: fix negative date delay when start (m,d) is after end (m,d).

parent 5a15b6d6
......@@ -109,6 +109,8 @@ def getCoherentReferencePeriod(dates_fn,start_month,nb_days,start_day=1,dates_pe
d1 = datetime.datetime(2000,min_start[0],min_start[1])
d2 = datetime.datetime(2000, max_end[0], max_end[1])
if (d2-d1).days < 0:
d2 = datetime.datetime(2001, max_end[0], max_end[1])
print min_start[0]
print min_start[1]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment