Commit 229c6671 authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

FIX: request periods spanning more than 1y

parent f1dd45d5
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
...@@ -38,7 +38,7 @@ def fetch(shp, dt, out_fld, api_key): ...@@ -38,7 +38,7 @@ def fetch(shp, dt, out_fld, api_key):
ed = datetime.strptime(dt.split('/')[1], '%Y-%m') ed = datetime.strptime(dt.split('/')[1], '%Y-%m')
delta = relativedelta(ed, sd) delta = relativedelta(ed, sd)
mosaic_dates = [str(d.year) + '-' + str(d.month).zfill(2) mosaic_dates = [str(d.year) + '-' + str(d.month).zfill(2)
for d in (sd + relativedelta(months=+n) for n in range(delta.months+1))] for d in (sd + relativedelta(months=+n) for n in range(12*delta.years + delta.months + 1))]
if not os.path.exists(out_fld): if not os.path.exists(out_fld):
os.makedirs(out_fld) os.makedirs(out_fld)
......
Supports Markdown
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