ee.Date.update

Create a new Date by setting one or more of the units of the given Date to a new value. אם מצוין אזור זמן, הערכים החדשים יפורשו לפי האזור הזה.

שימושהחזרות
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 Environment.

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)
)