Hello and welcome to JustAnswer. Please note: This is general information for educational purposes only and is not legal advice. No specific course of action is proposed herein, and no attorney-client relationship or privilege is formed by speaking to an expert on this site. By continuing, you confirm that you understand and agree to these terms.
I am sorry to hear about this situation. An L-1 visa does not provide a set number of days to remain in USA once the employment is terminated. Once employment is terminated, the L-1 visa ends as well. The individual is expected to leave USA as soon as possible. However by default, an automatic ban will not apply unless one overstays by 180+ days. This gives the person a few days/weeks to finalize their affairs before leaving.
While the less than 180 days may be asked about in a later visa application, the consular agent should normally know that due to the L-1 issue, one normally stays over a few days/weeks to finish affairs before leaving so it should not be an issue.
Anything longer, and one would want ot file an I-539 to to change status to a B-2 visitor visa. The problem with that is that a B-2 visa does not allow dual intent, so if USCIS learns that the B-2 is to attend one's own wedding, it may be denied. However because you say that the wedding is within 2 weeks - a reasonable amount of time in the scope of "finalizing affairs," this likely will not be an issue - I am only including this paragraph in an FYI matter.
After the marriage, the I-130/I-485 can be filed. USCIS will likely adjust you to a greencard based on marriage even if you are out of status provided that
1) You originally entered lawfully,
2) You have no criminal record or are a terror threat, and
3) The marriage is genuine.
I hope this helps and clarifies. Please use the SEND or REPLY button to keep chatting, or please RATE when finished. You may always ask follow ups at no charge after rating. Kindly rate my answer as one of TOP THREE FACES/STARS and then SUBMIT, as this is how experts get credit for our time. Rating my answer the bottom two faces/stars (or failing to submit the rating) does not give me credit and reflects poorly on me, even if my answer is correct. I work very hard to formulate an informative and honest answer for you; please reciprocate my good faith with a positive rating.