@sportsref.decorators.memoize<EOL><INDENT>def age(self, year, month=<NUM_LIT:2>, day=<NUM_LIT:1>):<DEDENT>
doc = self.get_main_doc()<EOL>date_string = doc('<STR_LIT>').attr('<STR_LIT>')<EOL>regex = r'<STR_LIT>'<EOL>date_args = map(int, re.match(regex, date_string).groups())<EOL>birth_date = datetime.date(*date_args)<EOL>age_date = datetime.date(year=year, month=month, day=day)<EOL>delta = age_date - birth_date<EOL>age = delta.days / <NUM_LIT><EOL>return age<EOL>
Returns the age of the player on a given date.

        :year: int representing the year.
        :month: int representing the month (1-12).
        :day: int representing the day within the month (1-31).
        :returns: Age in years as a float.