Question: What year was the romantic comedy that Josh Hartnett stars in released?

Context paragraphs:
The Ottoman Lieutenant: The Ottoman Lieutenant is a Turkish-American World War I drama film directed by Joseph Ruben and written by Jeff Stockwell.  The film stars Michiel Huisman, Hera Hilmar, Josh Hartnett and Ben Kingsley.  The film was released for an Oscar-qualifying run in December 2016, and was released widely on March 10, 2017.

40 Days and 40 Nights: 40 Days and 40 Nights is a 2002 satirical erotic romantic comedy film directed by Michael Lehmann, written by Rob Perez and starring Josh Hartnett, Shannyn Sossamon and Paulo Costanzo.  The film depicts Matt Sullivan, a San Francisco web designer who has chosen to abstain from any sexual contact for the duration of Lent.

Wicker Park (film): Wicker Park is a 2004 American psychological drama/romantic mystery film directed by Paul McGuigan and starring Josh Hartnett, Rose Byrne, Diane Kruger and Matthew Lillard.  The film is a remake of the 1996 French movie "L'Appartement", which in turn is loosely based on Shakespeare's "A Midsummer's Night Dream".  It was nominated for the at the Film Festival of Montreal, the city in which the movie was partially filmed.

6 Below: Miracle on the Mountain: 6 Below: Miracle on the Mountain is an upcoming American adventure drama film directed by Scott Waugh and written by Madison Turner, based on the non-fiction book "Crystal Clear" by Eric LeMarque and Davin Seay.  It stars Josh Hartnett, Mira Sorvino, Sarah Dumont and Jason Cottle, and tells the true story of former professional hockey player Eric LeMarque, who finds himself stranded in the High Sierras during a fierce snowstorm and must use his wit and willpower to survive.  The film will be released in the United States on October 13, 2017.

Here on Earth (film): Here on Earth is a 2000 American romantic drama film directed by Mark Piznarski from a screenplay by Michael Seitzman.  The film stars Chris Klein, Leelee Sobieski, and Josh Hartnett.  The original music score was composed by Kelly Jones and Andrea Morricone.

Josh Hartnett: Joshua Daniel Hartnett (born July 21, 1978) is an American actor and movie producer.  He first came to attention in 1997 for his role as Michael Fitzgerald in the television crime drama series "Cracker".  He made his feature film debut in 1998 in the slasher film "", followed by teen roles in films such as the sci-fi horror film "The Faculty" (1998) and the drama "The Virgin Suicides" (1999).  Hartnett had starring roles in the war film "Pearl Harbor", the drama "O", the war film "Black Hawk Down", the romantic comedy "40 Days and 40 Nights", the crime thriller Lucky Number Slevin (2006), and other films.

Mozart and the Whale: Mozart and the Whale (released as Crazy in Love in some parts of Europe) is a 2005 romantic comedy-drama film starring Josh Hartnett and Radha Mitchell, and directed by Petter Næss.

The Long Home: The Long Home is an upcoming indie drama film directed by and starring James Franco, based on the novel of the same name by William Gay.  It also stars Josh Hutcherson, Tim Blake Nelson, Courtney Love, Timothy Hutton, Giancarlo Esposito, Ashton Kutcher, Josh Hartnett, Zoe Levin, Analeigh Tipton, Scott Haze, and Robin Lord Taylor.  The film follows a young contractor who is hired to build a "honky-tonk" in Tennessee by the man who killed his father.

Parts per Billion: Parts Per Billion is a 2014 romantic drama written and directed by Brian Horiuchi.  It stars an ensemble cast comprising Josh Hartnett, Rosario Dawson, Teresa Palmer, Penn Badgley, Gena Rowlands, and Frank Langella as three loosely connected couples who must deal with a looming biological attack.

The Black Dahlia (film): The Black Dahlia is a 2006 French-American neo-noir crime thriller film directed by Brian De Palma and written by Josh Friedman.  It is drawn from the novel of the same name by James Ellroy and stars Josh Hartnett, Scarlett Johansson, Aaron Eckhart and Hilary Swank.  The widely sensationalized murder of Elizabeth Short inspired both the novel and the film.  The film was screened at the 63rd Venice International Film Festival on August 30, 2006, and was released in the United States on September 15, 2006.  Despite its failure both critically and financially, it was nominated for Best Cinematography at the 79th Academy Awards, losing to "Pan's Labyrinth".  Mia Kirshner's performance as Short was also widely praised.

Supporting paragraphs: Josh Hartnett 40 Days and 40 Nights
Answer: 2002