Indoors a plant will remain in vegetative phase until more completely uninterrupted darkness is provided than light. This is generalized as 12/12, which means 12 hours of light and 12 hours of darkness. A grower can initiate flowering at any time, even from the beginning of life.
Most plants when started on 12/12 lighting will not actually begin to flower until the 3rd week of life. Plants that have been on more than 12 hours of light per day will generally pre-sex around the 6th week of vegetative life.
I prefer to vegetate my plants for 5 to 6 weeks prior to flowering. This creates a well developed plant that is prepared to become mature. Clones are good to put in to 12/12 right off the bat, but plants from seed are better off when allowed a few weeks of vegetative light.
Figure 2 weeks for the seedling phase, then 3-4 weeks of vegetation (depending on the rebounding needs for training methods), then start flowering and allow for up to 10 weeks even when a strain is advertised as 7-8 weeks.