Commit 66a10da9 authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

ENH: better prototype for coherent period retrival.

parent 8f1d3714
......@@ -52,7 +52,7 @@ def getCoherentReferencePeriod(dates_fn,start_month,end_month,start_day=1,end_da
date_list = [datetime.datetime.strptime(x.strip(),'%Y%m%d') for x in lst]
if end_day is None:
end_day = monthrange(date_list[0].year,end_month)[2]
end_day = monthrange(date_list[0].year,end_month)[1]
end_date = (end_month,end_day)
# Get closest date to start_date
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