It's 5 years of you listen to cyclists. 2-3 years if you listen to the helmet companies and every season if you listen to their stockholders.
Really, it's about recognizing that helmets degrade slowly with use, faster with abuse, faster if left in the sun and probably also if left around ozone. I go about 5 years if that helmet has seen an easy life, sooner if not. I don't toss the ones with some life left. In a pinch when
#1 helmet isn't available for whatever reason, I'll pull out an old one.
Best approach for good helmet life is to refrain from slamming the helmet against solid objects or abrading it at high speeds, especially with heavy objects strapped inside.
Ben