Hard candies really don't go bad and can last a very long time.
I've had hard candies that have lasted for up to 10 years before I ate them.
The hard candies may not be as fresh but they do not go bad as in the hard candies that get older and older will not cause any health issues if you eat them.
Hard candies can actually remain safe for likely 50 years or longer.
However most people will eat the hard candies well before that time anyway.
But as long as the hard candy has remained sealed up they are still okay and safe to eat for many years after you buy them.
I usually eat any hard candy within a year or sooner but sometimes I have them longer than a few years and still eat the candy.