Rich Caniglia Age Portable Link

def get_age(self, name): birthdate = self.db.get_birthdate(name) if birthdate: today = datetime.today() age = today.year - birthdate.year - ((today.month, today.day) < (birthdate.month, birthdate.day)) return age return None

# Example usage: db = Database() # assume a Database class to interact with the database age_tracker = AgeTracker(db) rich caniglia age

from datetime import datetime

class AgeTracker: def __init__(self, db): self.db = db def get_age(self, name): birthdate = self

A simple web application that allows users to search for a public figure's age and receive their current age based on their birthdate. 2) db.store_birthdate("Rich Caniglia"

"AgeTracker"

rich_caniglia_birthdate = datetime(1958, 4, 2) db.store_birthdate("Rich Caniglia", rich_caniglia_birthdate)