ee.Date.serialize

  • serialize() returns a serialized (string) representation of a given ComputedObject (like an ee.Date object).

  • An optional boolean argument legacy can be passed to enable legacy formatting.

  • This function is accessible in both the Code Editor and the Python API (using geemap or Colab).

Returns the serialized representation of this object.

UsageReturns
Date.serialize(legacy)String
ArgumentTypeDetails
this: computedobjectComputedObjectThe ComputedObject instance.
legacyBoolean, optionalEnables legacy format.

Examples

Code Editor (JavaScript)

var date = ee.Date('2021-4-30');

print('Serialized representation of ee.Date', date.serialize());

Python setup

See the Python Environment page for information on the Python API and using geemap for interactive development.

import ee
import geemap.core as geemap

Colab (Python)

date = ee.Date('2021-4-30')

display('Serialized representation of ee.Date:', date.serialize())