お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、アクセスを維持するために
非商用目的での利用資格を確認する必要があります。2025 年 9 月 26 日までに確認が完了していない場合、アクセスが保留されることがあります。
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 です。 |
例
コードエディタ(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 API とインタラクティブな開発で geemap を使用する方法については、
Python 環境のページをご覧ください。
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'))
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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"]]