Breastmilk storage

How long can I leave it out on the counter after pumping? If it's in the fridge can I take it out and leave it on the counter? If so, for how long? Same question with freezer. Can I take it out before bed for my husband and leave it out for a couple hours for a nighttime feed? Or once you take it out of fridge/freezer does it need to be used right away? Help please!! Thanks mamas.