Whole grains

I make my own flour at home and someone asked me how long the whole grains will last before they go bad. I have had some grains about a year that I keep in a light-proof container in a cool place and they were still good when I ground them. So, what is the shelf life of whole grains?