It depends if you are salaried and receive a W2 OR if you are self employed and /or receive a 1099.
If you receive a W2 (you work for an employer full time), then all you need is a letter from the employer stating that you will be working there. After you sign a contract to buy a home, then you need 1 month of paystubs in order to close on your home.
If you work part time / hourly / independent contractor / self employed - then you need 2 years employment in order to qualify for a home loan.
The reason for the differences is with a W2, lenders can verify your employment and income easily. With other types of employment (commssion sales, self employed, hourly, independent contractor, etc.), the income varies and it's difficult for lenders to verify. Lenders will need 2 years tax returns and average 2 years employment to come up with an averae annual income.