Question: how long do you need to know someone to give a reference?
Answer: The bottom line: You want your reference letters packed with details. If you've only worked with a prof or mentor for six months but during that six months met frequently and productively, s/he will be able to tell an admissions committee lots about you.