Judge Melissa Saragosa also ordered the 34-year-old to complete 100 hours of community service and pay a $2,500 fine.
With the plea deal, Mayweather is avoiding trial on felony allegations that he hit his ex-girlfriend and threatened two of their children during an argument at her home in September 2010.
Prosecutor Lisa Luzaich told the judge Mayweather has been in trouble before and hasn't been punished.
Attorney Karen Winckler had argued that the public would benefit more if Mayweather performs 100 hours of community service with children.
She says she's considering an appeal.
Mayweather was told to report to jail Jan. 6.
The Associated Press contributed to this report.