def age(asof, dob):
    """
    get age as of a date based on birth date
    
    :param asof: datetime object, get age asof date based on dob birth date
    :param dob: datetime object, get age asof date based on dob birth date
    """
    return asof.year - dob.year - int((asof.month, asof.day) < (dob.month,
        dob.day))
