"There is peace in the Middle East," Rosie O'Donnell joked outside the courtroom

Credit: Adam Nemser/Startraks

Rosie O’Donnell‘s marriage is officially over.

The comedian settled her divorce with ex-wife Michelle Rounds during a three-hour court appearance Wednesday in New York, PEOPLE has confirmed.

“There’s peace in the Middle East,” O’Donnell, 53, joked on her way out, according to the New York Post‘s Page Six. “It’s done. We’ve settled. We’re both very happy about the outcome.”

“I feel great,” said Rounds, 44, according to the Post.

The resolution comes after the exes battled for custody of their daughter Dakota, 2, since April, when Rounds filed for sole custody. Her lawyer told reporters Wednesday that she and O’Donnell, 53, have agreed to joint legal custody of the little girl, according to Entertainment Tonight.

The divorce took a dark turn last month, when Rounds was hospitalized after an apparent overdose. A source told PEOPLE that despite their differences, O’Donnell comforted the N.Y.C. headhunter during the crisis.

The couple married in June 2012 at their home in Nyack, New York. They separated in November, and the former View co-host filed for divorce in February. O’Donnell was previously married to Kelli Carpenter from 2004-07.