No, it's 28 days before the end of the 2 years qualifying period. Though you also must apply before your visa expires.
There is a suggestion that the BIA will put your application on hold if your visa expires prior to 28 days before the end of the 2 years qualifying period.
I've heard of people being refused ILR for reasons like they applied after their spouse/FLR visa expired and not enough evidence that they were still in a relationship. So basically for not following the process.