7AZQFD7FQAG2MI5325GZFQ6M54GSG367DIBOR3QFQ375MD5WI7EQC
package leap
import "fmt"
func ExampleIsLeapYear() {
e := IsLeapYear(2020)
fmt.Println(e)
// Output: true
}
/*
Package leap will report if a given year is a leap year.
*/
package leap
// IsLeapYear gets a year and reports if it is a leap year or not.
func IsLeapYear(year int) bool {
if year%4 == 0 {
if year%100 == 0 {
if year%400 == 0 {
return true
}
return false
}
return true
}
return false
}