ב-Earth Engine הוספנו
רמות מכסת שימוש לא מסחרי כדי להגן על משאבי מחשוב משותפים ולספק ביצועים מהימנים לכולם. בפרויקטים לא מסחריים נעשה שימוש במסלול Community כברירת מחדל, אבל אפשר לשנות את המסלול של הפרויקט בכל שלב.
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
ee.Date.parse
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
ניתוח מחרוזת תאריך, על סמך מחרוזת שמתארת את הפורמט שלה.
| שימוש | החזרות |
|---|
ee.Date.parse(format, date, timeZone) | תאריך |
| ארגומנט | סוג | פרטים |
|---|
format | מחרוזת | דפוס, כפי שמתואר בכתובת http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html. |
date | מחרוזת | מחרוזת שתואמת לדפוס הנתון. |
timeZone | מחרוזת, ברירת המחדל: null | אזור הזמן (למשל, 'America/Los_Angeles'); ברירת המחדל היא UTC. |
דוגמאות
Code Editor (JavaScript)
print(ee.Date.parse('yyyy MM dd', '2021 4 30'));
print(ee.Date.parse('yyyy-MM-dd', '2021-4-30'));
print(ee.Date.parse('yyyy/MM/dd', '2021/4/30'));
print(ee.Date.parse('MM/dd/yy', '4/30/21'));
print(ee.Date.parse('MMM. dd, yyyy', 'Apr. 30, 2021'));
print(ee.Date.parse('yyyy-MM-dd HH:mm:ss', '2021-4-30 00:00:00'));
הגדרת Python
בדף
סביבת Python מפורט מידע על Python API ועל השימוש ב-geemap לפיתוח אינטראקטיבי.
import ee
import geemap.core as geemap
Colab (Python)
display(ee.Date.parse('YYYY MM dd', '2021 4 30'))
display(ee.Date.parse('YYYY-MM-dd', '2021-4-30'))
display(ee.Date.parse('YYYY/MM/dd', '2021/4/30'))
display(ee.Date.parse('MM/dd/YY', '4/30/21'))
display(ee.Date.parse('MMM. dd, YYYY', 'Apr. 30, 2021'))
display(ee.Date.parse('YYYY-MM-dd HH:mm:ss', '2021-4-30 00:00:00'))
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],["The `ee.Date.parse` function converts a date string into a Date object. It requires a `format` string, following Joda-Time patterns, to define the structure of the input `date` string. An optional `timeZone` can be specified, defaulting to UTC. Valid examples are provided and demostrated for various formats like 'yyyy MM dd', 'yyyy-MM-dd' or 'MM/dd/yy'. The function will return a new date based on the parsing of the date string.\n"]]