summaryrefslogtreecommitdiff
path: root/go/leap/leap.go
blob: 75908ebb12bf8fd5ba9eb2e9f45c8dff49769650 (plain)
1
2
3
4
5
6
7
8
package leap

const testVersion = 2

// IsLeapYear reports if it year is a leap year
func IsLeapYear(y int) bool {
	return y%4 == 0 && y%100 != 0 || y%400 == 0
}