what visa is it you have ??

if you have a spouse visa then it should be valid for 27 months, you need to be in the uk 23 months to be able to apply for ilr, so really you have 4 months to come to the uk, but leave within 3 months of the issue date and you shouldn't have any problems at all