Lindsay Lohan will definitely be in rehab at least until her court appearance later this month -- but how long she stays after that will probably be determined by the judge.
Sources tell us ... the plan is for Lindsay to stay in rehab at least until her October 22 court appearance before Judge Elden Fox. As for how much longer she stays ... we're told by the time of the hearing, Judge Fox will have docs from the doctors at Betty Ford, evaluating Lindsay's problems and progress.
If the judge determines Lindsay would be better served with rehab than jail, it's all but certain her stay will be extended.
As for the October 22 court appearance, Lindsay does not have to show, because in misdemeanor cases lawyers can appear on behalf of the client. But ... Judge Fox clearly thought Lindsay would be present since he assumed she'd be in custody until the hearing ... so it's a good bet she'll be there.