F-1 students may apply for post-completion OPT up to 90 days before their program end date and up to 60 days after their program end date. The application must be properly filed with the correct USCIS Service Center. In addition, the application must be properly filed within 30 days of the date the student’s DSO recommends OPT in SEVIS.
F-1 students who completed a bachelor’s, master’s, or doctoral degree in a STEM field and are currently engaged in post-completion OPT may apply for the STEM extension if they have a job or job offer from an E-Verify employer.
http://www.greencardapply.com/question/question08/question08_0514.htm
A: On April 8, 2008, DHS published an Interim Final Rule (IFR) titled Extending Period of Optional Practical Training by 17 Months for F-1 Nonimmigrant Students With STEM Degrees and Expanding Cap-Gap Relief for All F-1 Students With Pending H-1B Petitions.