The Silver Linings Playbook

Pat Solitano (Bradley Cooper), who has bipolar disorder, is released from a mental health facility into the care of his parents after eight months of treatment. He learns that his wife, Nikki (Brea Bee), has moved away and his father, Pat Sr. (Robert De Niro), is out of work and resorting to bookmaking to earn money to start a restaurant. Pat is determined to get his life back on track and reconcile with Nikki, who obtained a restraining order against him after the violent episode that sent him away.While talking to his court-mandated therapist Dr. Patel (Anupam Kher), Pat explains again why he was hospitalized. Coming home early from his high school teaching job, he found Nikki in their shower, having sex with another teacher, as Pat and Nikki's wedding song, Stevie Wonder's "My Cherie Amour," played on their stereo. Enraged, he nearly beat the man to death. Despite this, Pat doesn't believe he needs medication to manage his condition.At dinner with his friend Ronnie, he meets Ronnie's sister-in-law, Tiffany Maxwell (Jennifer Lawrence), a young widow and recovering sex addict who also just lost her job. Pat and Tiffany develop an odd friendship through their shared neuroses and he sees an opportunity to communicate with Nikki through her. Tiffany offers to deliver a letter to Nikki, if in return he will be her partner in an upcoming dance competition. He reluctantly agrees and the two begin a rigorous practice regimen over the following weeks. Pat believes the competition will be a good way to show Nikki he has changed and become a better man. Tiffany gives Pat a typed reply from Nikki, in which she cautiously hints there may be a chance for a reconciliation between them.Things go well for Pat until his father asks him to attend an Eagles game he has bet virtually all of his money on, as a "good-luck charm". Pat skips practice with Tiffany to attend the game, but is dragged into a fight and hauled away by police. The Eagles lose the game and Pat Sr. is furious. Tiffany arrives, berates Pat and argues in detail that the way she "reads the signs," Pat Sr. was luckier when Pat was practicing with her. Pat Sr. makes a parlay with his gambling friend that if the Eagles win their game against Dallas, and if Pat and Tiffany score at least a 5 out of 10 in their dance competition, he will win back double the money he lost on the first bet. Pat is reluctant to participate in the dance contest under those conditions and re-reads Nikki's letter. After noticing that a phrase Tiffany had uttered recurs in the letter supposedly written by Nikki, he realizes that Nikki's letter had been forged by Tiffany.Pat, Tiffany and everyone else arrive at the competition on the night of the football game. Tiffany is horrified to discover that Nikki is in the audience. Upset that Pat may win Nikki back and that she will lose him, Tiffany goes to the bar and has two vodkas. A frantic Pat spots her and manages to coax her onto the dance floor and they perform their routine. As they dance, the Eagles win their game and at the conclusion of their set they score exactly 5 points.Amid cheers from his family and confused looks from the crowd, Pat approaches Nikki and speaks quietly into her ear. Tiffany storms off. Pat leaves Nikki behind after only a short conversation, intent on finding Tiffany. He chases after her and tells her he knows she forged Nikki's letter. He confesses he has loved her from the moment he met her but has taken a long time to realize it and they kiss. They become a couple and Pat Sr. opens a restaurant with the money he has won.

Question: How long was Pat Solitano in a mental health facility?
Answer: eight months