def age_to_minutes(age: str) -> int:
    """ Convert job age to minutes.

    Parameters:
        age (str): age of job, in units of minutes, hours, or days.
    Returns:
        length (int): age of job in minutes.
    """
    units = age[-1]
    length = int(age[:-1])
    if units == 'm':
        pass
    elif units == 'h':
        length = 60 * length
    elif units == 'd':
        length = 60 * 24 * length
    else:
        # Ages greater than 7 days formatted as "mmm d"
        length = 60 * 24 * 7
    return length