def get_common_movies(first_actor_credits, second_actor_credits):
  """
  Takes two arrays of actor credits, first_actor_credits and second_actor_credits
  Returns an array of movies that are common to both actors
  """
  common_movies = []
  for first_movie in first_actor_credits:
    for second_movie in second_actor_credits:
      if first_movie['id'] == second_movie['id']:
        common_movies.append({
          'title': first_movie['title'],
          'date': first_movie['release_date'][0:4],
        })
  return common_movies