Length of seed viability is dependent on a number of factors. One is species. Some species don't store well at all. The ones you mention are not particularly difficult to store, however.
The other conditions are environmentally related. Store the seeds at low humidity and low temperature for longest viability. (I put my seeds in air-tight containers in an extra refrigerator, and find that most types will last a couple of years that way.