def lenYear(year):
    """
    Calculates the length of a year in days
    Useful to figure out if a certain year is a leap year
    """
    import calendar
    feblen = calendar.monthrange(year, 2)[1]
    otherlens = 365 - 28
    return feblen + otherlens
