Contents

Roo

DateTime.leap?

Returns True of this DateTime object is a Gregorian leap year, False if not.

var d1 = DateTime(2018, 1, 31) # Jan 31st 2018.
print(d1.leap?) # False.
var d2 = DateTime(2012, 5, 10) # May 10th 2012.
print(d2.leap?) # True.