iobis / obis-issues

Repository for all OBIS related issues and feature requests
4 stars 3 forks source link

supporting date intervals as eventDate #166

Open damianooldoni opened 4 years ago

damianooldoni commented 4 years ago

I am wondering how OBIS handle date intervals in DwC field eventDate. Is there documentation about it available? As I am mostly working with GBIF, I know this is quite an issue there (https://github.com/gbif/gbif-api/issues/4). Thanks in advance!

pieterprovoost commented 4 years ago

@damianooldoni Yes, we support ISO 8601 date ranges, but in many cases (such date filtering) we only take into account the midpoint of the interval. We intend to make better use of start and end dates in the future. The API does return the start, mid, and end dates as unix time: https://api.obis.org/occurrence/fd425d8f-a9d7-4a1d-9c40-e40b91fbc3b4

damianooldoni commented 4 years ago

Nice, thanks! A little extra question. In the link provided the time interval is within the same year. I suppose nothing changes if the interval spans multiple years. But which is the value of the field date_year in such case?

pieterprovoost commented 4 years ago

In that case date_year will be the year of the midpoint, see https://api.obis.org/occurrence/c9f89192-828f-420b-84fe-fa0c9eda14f5 for example. Suggestions for improvement are welcome!

damianooldoni commented 4 years ago

thanks @pieterprovoost. Nice!