Generally, you want to get the freshest roasted coffee you can get your hands on. After more than a couple of weeks from the roasting date, you will find deterioration in quality. It will still be perfectly drinkable, but it won't be at its best. There is one small caveat. It is best to wait a few days to allow freshly roasted coffees to calm down, as they are usually too gassy to brew right away.