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\u003e\u003ccode\u003eDateRange.intersection()\u003c/code\u003e returns a new \u003ccode\u003eDateRange\u003c/code\u003e representing the overlapping period between two \u003ccode\u003eDateRange\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eThis function takes another \u003ccode\u003eDateRange\u003c/code\u003e as an argument and determines the common time span between the two.\u003c/p\u003e\n"],["\u003cp\u003eYou can use this function to identify the period where both date ranges coincide for further analysis or filtering.\u003c/p\u003e\n"],["\u003cp\u003eCode examples are provided in JavaScript, Python, and Colab demonstrating how to use \u003ccode\u003eDateRange.intersection()\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `intersection()` method determines the overlapping period between two `DateRange` objects. It takes another `DateRange` as input (`other`). The method returns a new `DateRange` that represents the shared time interval between the original `DateRange` and the input `DateRange`. For example, intersecting '2017-06-24' to '2017-07-24' with '2017-07-01' to '2018-08-24' yields a DateRange from '2017-07-01' to '2017-07-24'.\n"],null,["# ee.DateRange.intersection\n\nReturns a DateRange that contains all points in the intersection of this DateRange and another.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------|-----------|\n| DateRange.intersection`(other)` | DateRange |\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-07-01', '2018-08-24');\n\n// Determine the intersection of two ee.DateRange objects.\nprint('Intersection of dateRange1 and dateRange2',\n dateRange1.intersection(dateRange2));\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-07-01', '2018-08-24')\n\n# Determine the intersection of two ee.DateRange objects.\ndisplay(\n 'Intersection of date_range_1 and date_range_2:',\n date_range_1.intersection(date_range_2)\n)\n```"]]