Earth Engine ได้เปิดตัว
ระดับโควต้าที่ไม่ใช่เชิงพาณิชย์เพื่อปกป้องทรัพยากรการประมวลผลที่ใช้ร่วมกันและรับประกันประสิทธิภาพที่เชื่อถือได้สำหรับทุกคน โปรเจ็กต์ที่ไม่ใช่เชิงพาณิชย์จะใช้ระดับชุมชนโดยค่าเริ่มต้น แต่คุณสามารถเปลี่ยนระดับของโปรเจ็กต์ได้ทุกเมื่อ
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
ee.DateRange
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้าง DateRange โดยมีวันที่เริ่มต้น (รวม) และวันที่สิ้นสุด (ไม่รวม) ที่ระบุ ซึ่งอาจเป็นวันที่ ตัวเลข (ตีความเป็นมิลลิวินาทีตั้งแต่ 1970-01-01T00:00:00Z) หรือสตริง (เช่น "1996-01-01T08:00") หากไม่ได้ระบุ "end" ระบบจะสร้างช่วง 1 มิลลิวินาทีโดยเริ่มที่ "start"
| การใช้งาน | การคืนสินค้า |
|---|
ee.DateRange(start, end, timeZone) | DateRange |
| อาร์กิวเมนต์ | ประเภท | รายละเอียด |
|---|
start | วัตถุ | |
end | ออบเจ็กต์ ค่าเริ่มต้น: null | |
timeZone | สตริง ค่าเริ่มต้น: null | หากระบุ start และ/หรือ end เป็นสตริง เขตเวลาที่จะใช้ตีความสตริงดังกล่าว โดยค่าเริ่มต้นจะเป็น UTC |
ตัวอย่าง
โปรแกรมแก้ไขโค้ด (JavaScript)
print('String date inputs (interpreted as UTC by default)',
ee.DateRange('2017-06-24', '2017-07-24'));
print('String date inputs with timeZone argument',
ee.DateRange('2017-06-24', '2017-07-24', 'America/Los_Angeles'));
print('String date-time inputs with timeZone argument',
ee.DateRange('2017-06-24T07:00:00', '2017-07-24T07:00:00',
'America/Los_Angeles'));
print('A single date input results in a 1-millisecond range',
ee.DateRange('2017-06-24'));
print('ee.Date inputs',
ee.DateRange(ee.Date('2017-06-24'), ee.Date('2017-07-24')));
print('ee.Date date-time inputs (UTC by default)',
ee.DateRange(ee.Date('2017-06-24T07:00:00'),
ee.Date('2017-07-24T07:00:00')));
print('ee.Date date-time inputs with timeZone arguments',
ee.DateRange(ee.Date('2017-06-24T07:00:00', 'UTC'),
ee.Date('2017-07-24T07:00:00', 'America/Los_Angeles')));
print('Number inputs as milliseconds from Unix epoch (2017-06-24, 2017-07-24)',
ee.DateRange(1498262400000, 1500854400000));
การตั้งค่า Python
ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า
สภาพแวดล้อม Python
import ee
import geemap.core as geemap
Colab (Python)
display('String date inputs (interpreted as UTC by default):',
ee.DateRange('2017-06-24', '2017-07-24'))
display('String date inputs with timeZone argument:',
ee.DateRange('2017-06-24', '2017-07-24', 'America/Los_Angeles'))
display('String date-time inputs with timeZone argument:',
ee.DateRange('2017-06-24T07:00:00', '2017-07-24T07:00:00',
'America/Los_Angeles'))
display('A single date input results in a 1-millisecond range:',
ee.DateRange('2017-06-24'))
display('ee.Date inputs',
ee.DateRange(ee.Date('2017-06-24'), ee.Date('2017-07-24')))
display('ee.Date date-time inputs (UTC by default):',
ee.DateRange(ee.Date('2017-06-24T07:00:00'),
ee.Date('2017-07-24T07:00:00')))
display('ee.Date date-time inputs with timeZone arguments:',
ee.DateRange(ee.Date('2017-06-24T07:00:00', 'UTC'),
ee.Date('2017-07-24T07:00:00',
'America/Los_Angeles')))
display('Number inputs as milliseconds from Unix epoch (2017-06-24, 2017-07-24):',
ee.DateRange(1498262400000, 1500854400000))
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-10-30 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-10-30 UTC"],[],[]]