In role Dateish§

See primary documentation in context for method is-leap-year

method is-leap-year(Dateish:D: --> Bool:D)

Returns True if the year of the Dateish object is a leap year.

say DateTime.new(:year<2016>).is-leap-year# OUTPUT: «True␤» 
say Date.new("1900-01-01").is-leap-year;    # OUTPUT: «False␤»