If you want to file 485 by Aug. 17, the bottom line is I-140 filed before July 31. Otherwise your PD won't be in July, and thus not eligible to file 485 by 08/17.