How to tell when broccoli has gone bad?
As many people here have noted, these "sell by" and "best by" dates are not very consistent, accurate or well defined. If your broccoli looks fine and smells fine, chances are it's fine.

Signs of spoilage to look for are: sliminess on the surface, mushy areas in the broccoli flesh, small dark areas dotting the "canopy" or the tops of the florets, or furry moldy areas anywhere on the broccoli.

In addition, there was a recent question here  I bought a bag of Brussels sprouts that looked fine but smelled exceptionally bad, even for sprouts    where the vegetables looked great but smelled horrible. I have never experienced that myself, but certainly if your broccoli begins to stink, toss it.

If it starts to look limp and wilted but fine otherwise, it's still ok to cook.