toDOY#

geetools.ee_date.DateAccessor.toDOY()#

Convert a date to a day of year.

This method is computing a year agnostic day of year. It means that the year will always be described as a 366 day interval and the day of year will be between 0 and 365. it means that for non leap year all days will be shifted by 1 after the 28th of February. Thus the 1st of march will always be the 60th day of year.

Returns:

The day of year.

Return type:

ee.Number

Examples

import ee, geetools
from geetools.utils import initialize_documentation

initialize_documentation()

doy = ee.Date('2020-01-01').geetools.toDOY()
doy.getInfo()
0