ee.Date.fromYMD

Returns a Date given year, month, day.

UsageReturns
ee.Date.fromYMD(year, month, day, timeZone)Date
ArgumentTypeDetails
yearInteger

monthInteger

dayInteger

timeZoneString, default: null

The time zone (e.g. 'America/Los_Angeles'); defaults to UTC.

Examples

Code Editor (JavaScript)

print('Date with default UTC',
      ee.Date.fromYMD(2021, 4, 30));

print('Date with time zone specified',
      ee.Date.fromYMD(2021, 4, 30, 'America/Los_Angeles'));