Pre Roast / Green Beans: grinding up a batch of unroasted green beans would be very unpleasant - for the flavour of coffee to develop. your green coffee needs to be expertly roasted, to a roast profile appropriate to that coffee bean - kind of like a recipe.
Roast Day: once your coffee beans are roasted, they change from a mild or deep green to brown (a light roast is lighter in colour and a dark roast is dark and glossy). Consuming coffee from coffee beans that are straight out of the coffee roaster will typically lack much flavour and be slightly acidic - coffee needs time to develop the flavours.
Day 2-6: coffee matures and coffee flavour develops over the first five days after roasting. Your coffee beans will continue to let off a harmless gas, which is the reason why your coffee is packed in foil lined coffee bags with one way degassing valves. Your coffee flovour will become more pronounced.
Day 7-28: in my opinion, this is the ideal period to consume your coffee beans. The flovour will be bold and strong, giving you cafe quality coffee.
Day 29- Day 60: Your coffee in now somewhere between one and two months post roast -many roasters will tell you that coffee roasted more than one month ago is no good - that's not true and in some cases will be preferred. Its true that the flavours will begin to mellow and become more subdued, but that may be what you are looking for. Coffee kept in an airtight container, or the foil coffee bag your coffee arrived in, will ensure your coffee is as fresh as it can be.
Coffee sold at supermarkets is sometimes over one year old, and that's even before its put into your shopping trolley.