ee.DateRange.contains

Returns true if the given Date or DateRange is within this DateRange.
UsageReturns
DateRange.contains(other)Boolean
ArgumentTypeDetails
this: dateRangeDateRange
otherObject

Examples

Code Editor (JavaScript)

// A series of ee.DateRange objects.
var dateRange1 = ee.DateRange('2017-06-24', '2017-07-24');
var dateRange2 = ee.DateRange('2017-06-30', '2017-07-10');
var dateRange3 = ee.DateRange('2010-06-24', '2020-07-24');

// Determine if an ee.DateRange is contained within another.
print('Does dateRange1 contain dateRange2?', dateRange1.contains(dateRange2));
print('Does dateRange1 contain dateRange3?', dateRange1.contains(dateRange3));