ee.Date.fromYMD

แสดงผลวันที่ตามปี เดือน และวันที่ที่ระบุ

การใช้งานการคืนสินค้า
ee.Date.fromYMD(year, month, day, timeZone)วันที่
อาร์กิวเมนต์ประเภทรายละเอียด
yearจำนวนเต็มเช่น ปี 2013
monthจำนวนเต็มเช่น เดือน 3
dayจำนวนเต็มเช่น วันที่ 15
timeZoneสตริง ค่าเริ่มต้น: nullเขตเวลา (เช่น 'America/Los_Angeles'); ค่าเริ่มต้นคือ UTC

ตัวอย่าง

โปรแกรมแก้ไขโค้ด (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'));

การตั้งค่า Python

ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า สภาพแวดล้อม Python

import ee
import geemap.core as geemap

Colab (Python)

display('Date with default UTC:', ee.Date.fromYMD(2021, 4, 30))

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