Chocolate starts to go bad within 6 months which only means that the texture changes and the taste gets stale when the chocolate reaches past 6 months in age.
Chocolate that has gone stale and is past expiration date is still very safe to eat although it just won't taste as good and you might want to just use it cooking with instead.
You can wrap chocolate in plastic wrap and refrigerate the chocolate to keep it fresher longer.
I've eaten chocolate that has been well over a year since it was fresh and it's still been safe to eat but it just wasn't as enjoyable.