That, plus finding beans that were roasted in the last couple of weeks instead of having a "best used by" date that is twelve months out. I wish every roaster would switch to a "roasted on" date instead, but the ones that do are doing it right.
Speciality roasters will print a roast date.
James Hoffman just made a video on exactly this topic: https://youtu.be/O9YnLFrM7Fs
Warning: once you start on his videos you may never return.