In my experience it takes a long time for onions to go bad. If they're stored uncut at room temperature, at some point they'll get soft and at that point if you cut you'll see the mold. Stored in the fridge, it's more like they just eventually appear soft and mealy. Even then, in a pinch, they've been edible...if bland.