I know 'within" means before a certain period of time has passed. I have trouble using it correctly. I have written a few examples below with it.
(1) Everyone will receive a raise within five days after the management and the union reach an agreement and complete all the paperwork.
(2) John asks me, "Within what period from the date of purchase do you choose canned foods that are safe to eat?" I reply, "I usually choose canned foods that expire within one year of the date of purchase."
Some of my non-native English speaking friends think you have to use "within" with "of". Others think it's okay to use "after" and "from" as in my examples.
Are my chosen prepositions wrong? Please help me. Thank you very much.