summary refs log blame commit diff stats
path: root/go/leap/leap.go
blob: e56ff653094ce5f7eec2faa61587b561caa28c62 (plain) (tree)
1
2
3
4
5
6
7






                                                              
// leap implements IsLeapYear.
package leap

// IsLeapYear returns if the year passed is a leap year.
func IsLeapYear(year int) bool {
	return year%4 == 0 && (year%100 != 0 || year%400 == 0)
}