def _get_day_count_before_year(year):
    # type: (int) -> int
    """Retrieves the number of days elapsed before a given year."""
    year -= 1
    return (year * 365) + (year // 4) - (year // 100) + (year // 400)