isLeap#

geetools.ee_date.DateAccessor.isLeap()#

Check if the year of the date is a leap year.

Returns:

1 if the year is a leap year, 0 otherwise.

Return type:

ee.Number

Examples

import ee, geetools
from geetools.utils import initialize_documentation

initialize_documentation()

isLeap = ee.Date('2020-01-01').geetools.isLeap()
isLeap.getInfo()
1