Chopped onion storage
How much onion?  It doesn't take much time to chop onion.  The only way to store chopped onion for 2 weeks is to freeze.  However, once thawed, the texture will not be good.  The best answer partly depends on what you are going to use them for.  I would say a day in  advance is the most you will probably want to do.  If they are going to be a raw condiment or part of a salad, you will want them freshly chopped.