ee.Date.update

指定された Date の 1 つ以上の単位を新しい値に設定して、新しい Date を作成します。timeZone が指定されている場合、新しい値はそのゾーンで解釈されます。

用途戻り値
Date.update(year, month, day, hour, minute, second, timeZone)日付
引数タイプ詳細
これ: date日付
year整数、デフォルト: null
month整数、デフォルト: null
day整数、デフォルト: null
hour整数、デフォルト: null
minute整数、デフォルト: null
second数値、デフォルト: null
timeZone文字列、デフォルト: nullタイムゾーン(例: 「America/Los_Angeles」)。デフォルトは UTC です。

コードエディタ(JavaScript)

var date = ee.Date('2021-4-30T07:15:31.24');

print('Updated year and minute components of the input date',
  date.update({
    year: 2010,
    minute: 59
  })
);

Python の設定

Python API とインタラクティブな開発での geemap の使用については、 Python 環境のページをご覧ください。

import ee
import geemap.core as geemap

Colab(Python)

date = ee.Date('2021-4-30T07:15:31.24')

display(
    'Updated year and minute components of the input date:',
    date.update(year=2010, minute=59)
)