most shelf-stable foods are safe indefinitely. in fact, canned goods will last for years, as long as the can itself is in good condition (no rust, dents, or swelling). packaged foods (cereal, pasta, cookies) will be safe past the 'best by' date, although they may eventually become stale or develop an off flavor.