Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eintersects()\u003c/code\u003e method determines if two \u003ccode\u003eDateRange\u003c/code\u003e objects share any common points in time.\u003c/p\u003e\n"],["\u003cp\u003eIt returns \u003ccode\u003etrue\u003c/code\u003e if there's an overlap between the date ranges, otherwise it returns \u003ccode\u003efalse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe method takes one argument, \u003ccode\u003eother\u003c/code\u003e, which is the \u003ccode\u003eDateRange\u003c/code\u003e to compare against the original.\u003c/p\u003e\n"],["\u003cp\u003eThis function is useful for filtering or analyzing temporal data based on overlapping time periods.\u003c/p\u003e\n"]]],["`DateRange.intersects(other)` checks if two `DateRange` objects share at least one common point. It takes another `DateRange` as an argument (`other`) and returns a boolean value. The provided examples in JavaScript and Python demonstrate this by creating four `DateRange` objects and comparing `dateRange1` with the other date ranges to determine if they intersect, printing `true` or `false` for each comparison.\n"],null,["# ee.DateRange.intersects\n\nReturns true if the given DateRange has at least one point in common with this DateRange.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------|---------|\n| DateRange.intersects`(other)` | Boolean |\n\n| Argument | Type | Details |\n|-------------------|-----------|---------|\n| this: `dateRange` | DateRange | |\n| `other` | DateRange | |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// A series of ee.DateRange objects.\nvar dateRange1 = ee.DateRange('2017-06-24', '2017-07-24');\nvar dateRange2 = ee.DateRange('2017-06-30', '2018-07-10');\nvar dateRange3 = ee.DateRange('1970-06-24', '1971-07-24');\nvar dateRange4 = ee.DateRange('2017-06-25', '2017-07-25');\n\n// Determine if an ee.DateRange intersects another.\nprint('Does dateRange1 contain dateRange2?', dateRange1.intersects(dateRange2));\nprint('Does dateRange1 contain dateRange3?', dateRange1.intersects(dateRange3));\nprint('Does dateRange1 contain dateRange4?', dateRange1.intersects(dateRange4));\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# A series of ee.DateRange objects.\ndate_range_1 = ee.DateRange('2017-06-24', '2017-07-24')\ndate_range_2 = ee.DateRange('2017-06-30', '2018-07-10')\ndate_range_3 = ee.DateRange('1970-06-24', '1971-07-24')\ndate_range_4 = ee.DateRange('2017-06-25', '2017-07-25')\n\n# Determine if an ee.DateRange intersects another.\ndisplay(\n 'Does date_range_1 contain date_range_2?',\n date_range_1.intersects(date_range_2)\n)\ndisplay(\n 'Does date_range_1 contain date_range_3?',\n date_range_1.intersects(date_range_3)\n)\ndisplay(\n 'Does date_range_1 contain date_range_4?',\n date_range_1.intersects(date_range_4)\n)\n```"]]