geetools.DateAccessor.getUnitSinceEpoch#
- geetools.DateAccessor.getUnitSinceEpoch(unit='day')#
Get the number of units since epoch (1970-01-01).
- Parameters:
unit (str) – The unit to return the number of. One of:
second
,minute
,hour
,day
,month
,year
.- Returns:
The number of units since the epoch.
- Return type:
ee.Number
Examples
import ee, geetools ee.Initialize() d = ee.Date('2020-01-01').geetools.getUnitSinceEpoch('year') d.getInfo()