Earth Engine is introducing noncommercial quota tiers to safeguard shared compute resources and ensure reliable performance for everyone. All noncommercial projects will need to select a quota tier by April 27, 2026 or will use the Community Tier by default. Tier quotas will take effect for all projects (regardless of tier selection date) on April 27, 2026. Learn more.
ee.Date.advance
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
The Date.advance method creates a new Date by adding a specified delta and unit to a given Date.
The delta argument is a Float representing the amount to add, and the unit is a String specifying the unit of time ('year', 'month', 'week', 'day', 'hour', 'minute', or 'second').
An optional timeZone argument can be provided as a String to specify the time zone, defaulting to UTC.
The method returns a new Date object.
Examples are provided in both JavaScript and Python demonstrating how to use the advance method with positive and negative delta values.
Create a new Date by adding the specified units to the given Date.
Usage
Returns
Date.advance(delta, unit, timeZone)
Date
Argument
Type
Details
this: date
Date
delta
Float
unit
String
One of 'year', 'month', 'week', 'day', 'hour', 'minute', or 'second'.
timeZone
String, default: null
The time zone (e.g., 'America/Los_Angeles'); defaults to UTC.
[[["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 2025-06-23 UTC."],[],["The `Date.advance` function modifies a given date by adding a specified `delta` of time units. Units can be 'year', 'month', 'week', 'day', 'hour', 'minute', or 'second'. A negative `delta` subtracts time. An optional `timeZone` argument sets the time zone. It takes a date object, a float for `delta` and string for `unit` as arguments. The function returns a new Date object with modified time.\n"]]