Volunteered at a food pantry for a while. They give out expired canned food within limits with some exceptions (can’t remember the exact exceptions, maybe dairy in shorter period and over 6 months for all else). Ask the place you want to donate to, they will know). Grocery stores turn over to pantries on exact expiration, but the pantries distribute longer.