Brown has already spent a couple of months in jail and more than three months in a rehab program and was given 234 days of credit for time served. That means he still has 131 days to serve in county jail. Because of overcrowding, inmates typically serve far less than their entire sentence.
Mark Geragos, Brown's attorney, said the singer could be released by the weekend because he has served so much of the 365-day sentence.
Brown, 25, has been behind bars since mid-March when he was taken into custody after being tossed out of a rehabilitation center for using threatening words.
Brown was facing an allegation of violating his probation because he was arrested last October and charged with assault outside a Washington, D.C., hotel.
Los Angeles County Superior Court Judge James Brandlin said the 365-day sentence was the maximum he could give the defendant short of state prison for violating his probation in the Rihanna assault felony conviction.
Brandlin, in making the decision, said he had noted that Brown was a relatively youthful offender without a criminal record at the time of his 2009 assault on Rihanna.
The judge noted it has since been determined that Brown has an underlying mental health condition that was a mitigating factor in his sentencing. Previous court records have stated that Brown is bipolar.
That diagnosis came after an incident in which Brown walked out of a therapy session and threw a rock through his mother's car window, according to court records.
Brown repeatedly answered "Yes, sir," as the judge asked him about his admission, including that he acknowledged committing a crime in Washington, D.C.
The judge said he would reinstate Brown's probation when he is released and will require the defendant to see a Pasadena psychiatrist twice a week and a therapist, complete his outstanding community service, take appropriate medication and not use medical marijuana.
Brandlin extended Brown's probation to Jan. 23, 2015.
Brown still faces a misdemeanor assault trial in the nation's capital. That trial was delayed after the singer's bodyguard was found guilty in a separate trial related to the incident.
The singer had denied any wrongdoing until Friday's admission.