Task

Determine whether a given year is a leap year in the Gregorian calendar.



See also

 Leap year (wiki)


[indent=4]
/*
   Leap year, in Genie
 
   valac leapYear.gs
   ./leapYear
*/
init
    years:array of DateYear = {1900, 1994, 1996, 1997, 2000, 2100}
 
    for year in years
        status:string = year.is_leap_year() ? "" : "not "
        stdout.printf("%d is %sa leap year.\n", year, status)