pygbif
pygbif copied to clipboard
date range queries potential issue
A user wants to query a range of months overlapping two different years. It's clear that its not really possible to do month 11 to month 2, so probably have to use year-month dates. It doesn't seem possible with year-month dates though. We've tried eventDate with YYYY-MM,YYYY-MM, e.g., 2010-10,2011-02, but that doesn't work. e.g.,
from pygbif import occurrences
x = occurrences.search(2489603, eventDate="2010-11,2011-12")
dates = [ z['eventDate'] for z in x['results'] ]
the dates are all in 2011
In [31]: min(dates)
Out[31]: '2011-01-02T00:00:00'
In [32]: max(dates)
Out[32]: '2011-04-30T00:00:00'
There's about 5500 or so records for this request, and paging through to the end, all dates I believe are 2011.
@MattBlissett @timrobertson100 any ideas on date range searches?
note to self, waiting on gbif/occurrence issue linked above