ee.Date.unitRatio

1 つの単位の長さと別の単位の長さの比率を返します。たとえば、unitRatio('day', 'minute') は 1,440 を返します。有効な単位は「year」、「month」、「week」、「day」、「hour」、「minute」、「second」です。

用途戻り値
ee.Date.unitRatio(numerator, denominator)浮動小数点数
引数タイプ詳細
numerator文字列
denominator文字列

コードエディタ(JavaScript)

print('Minutes in a day', ee.Date.unitRatio('day', 'minute'));
print('Seconds in a year', ee.Date.unitRatio('year', 'second'));
print('Years in a month', ee.Date.unitRatio('month', 'year'));
print('Hours in a week', ee.Date.unitRatio('week', 'hour'));

Python の設定

Python API とインタラクティブな開発での geemap の使用については、 Python 環境のページをご覧ください。

import ee
import geemap.core as geemap

Colab(Python)

display('Minutes in a day:', ee.Date.unitRatio('day', 'minute'))
display('Seconds in a year:', ee.Date.unitRatio('year', 'second'))
display('Years in a month:', ee.Date.unitRatio('month', 'year'))
display('Hours in a week:', ee.Date.unitRatio('week', 'hour'))