Spices and Dried Herbs
Shelf Life: Whole spices 2 years; Ground spices and dried herbs 1 year.
Do buy spices whole, versus ground, whenever possible and grind them just before using. Grinding releases the volatile compounds that give a spice its flavor and aroma. The longer the spice sits around (or is stored) the more compounds disappear.
Don't store spices and herbs on the counter close to the stove. Heat, light, and moisture shorten their life.
Checking for freshness - crumble a small amount of the dried herb between your fingers and take a whif. If it releases a lively aroma, it's still good to go. If the aroma and color of the spice have faded, it's time to restock.
Info from Cooking Illustrated Magazine