The age-activity-rotation relationship in solar-type stars