geetools.DateRange.DateRangeAccessor.split#
- geetools.DateRange.DateRangeAccessor.split(interval, unit='day')#
Convert a
ee.DateRange
to a list ofee.DateRange
.The DateRange will be split in multiple DateRanges of the specified interval and Unit. For example “1”, “day”. if the end date is not included the last dateRange length will be adapted.
- Parameters:
interval (geetools.types.ee_int) – The interval to split the DateRange
unit (str) – The unit to split the DateRange. One of:
second
,minute
,hour
,day
,month
,year
.
- Returns:
The list of DateRanges
- Return type:
ee.List
Examples
import ee, geetools ee.Initialize() d = ee.DateRange('2020-01-01', '2020-01-31').geetools.split(1, 'day') d.getInfo()