quantlib.time.date.is_leap

is_leap(int year)

Whether the given year is a leap one.