start_year 1860 end_year datetime now year year max movie year start_y

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
start_year = 1860
end_year = datetime.now().year
year = max(movie.year, start_year)
year = min(year, end_year)
FACTOR = 0
dividend = (year - start_year) - (end_year - year) * FACTOR
divisor = end_year - start_year
delta = dividend / divisor
self.rating *= delta