geetools.Date.DateAccessor.fromEpoch#
- classmethod geetools.Date.DateAccessor.fromEpoch(number, unit='day')#
Set an the number of units since epoch (1970-01-01).
- Parameters:
number (int) – The number of units since the epoch.
unit (str) – The unit to return the number of. One of:
second,minute,hour,day,month,year.
- Returns:
The date as a
ee.Dateobject.- Return type:
ee.Date
Examples
import ee, geetools ee.Initialize() d = ee.Date.geetools.fromEpoch(49, 'year') d.getInfo()