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\u003eDateRange.isEmpty()\u003c/code\u003e method returns \u003ccode\u003etrue\u003c/code\u003e if the DateRange object represents an empty time interval (i.e., the start date is equal to or later than the end date).\u003c/p\u003e\n"],["\u003cp\u003eIt can be applied to any \u003ccode\u003eee.DateRange\u003c/code\u003e object to check its validity.\u003c/p\u003e\n"],["\u003cp\u003eIf the start date is earlier than the end date, the DateRange is considered valid and the method returns \u003ccode\u003efalse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhen the start and end dates are the same, the \u003ccode\u003eDateRange.isEmpty()\u003c/code\u003e method will also return \u003ccode\u003etrue\u003c/code\u003e, indicating an empty or instantaneous range.\u003c/p\u003e\n"]]],["The `isEmpty()` method checks if a `DateRange` contains no dates. It returns a boolean value: `true` if the start date is greater than or equal to the end date, `false` otherwise. It operates on a `DateRange` object. Examples demonstrate creating `DateRange` objects and using `isEmpty()` to check their status, outputting the boolean result in both Javascript and python.\n"],null,["# ee.DateRange.isEmpty\n\nReturns true if this DateRange contains no dates (i.e. start \\\u003e= end).\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------|---------|\n| DateRange.isEmpty`()` | Boolean |\n\n| Argument | Type | Details |\n|-------------------|-----------|---------|\n| this: `dateRange` | 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-24', '2017-06-24');\nvar dateRange3 = ee.DateRange('2017-07-24', '2017-07-24');\n\n// Determine if the ee.DateRange is empty.\nprint('Is dateRange1 empty?', dateRange1.isEmpty());\nprint('Is dateRange2 empty?', dateRange2.isEmpty());\nprint('Is dateRange3 empty?', dateRange3.isEmpty());\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-24', '2017-06-24')\ndate_range_3 = ee.DateRange('2017-07-24', '2017-07-24')\n\n# Determine if the ee.DateRange is empty.\ndisplay('Is date_range_1 empty?', date_range_1.isEmpty())\ndisplay('Is date_range_2 empty?', date_range_2.isEmpty())\ndisplay('Is date_range_3 empty?', date_range_3.isEmpty())\n```"]]