Background: Lal Krishna Advani (born 8 November 1927) known as L. K. Advani is an Indian politician who served as the 7th Deputy Prime Minister of India from 2002 to 2004 under Atal Bihari Vajpayee. Advani also served as Minister of Home Affairs in the BJP-led National Democratic Alliance government from 1998 to 2004. He is one of the co-founder and senior leader of Bharatiya Janata Party. He was the Leader of the Opposition in the 10th Lok Sabha and 14th Lok Sabha.
Context: In an interview with a news channel in December 2006, Advani stated that as the Leader of the Opposition in a parliamentary democracy, he considered himself the Prime Ministerial candidate for the general elections, ending on 16 May 2009. Some of his colleagues were not supportive of his candidacy. A major factor in favour of Advani was that he had always been the most powerful leader in the BJP with the exception of Vajpayee, who endorsed Advani's candidacy. On 2 May 2007, BJP President Rajnath Singh stated that: "After Atal there is only Advani. Advani is the natural choice. It is he who should be PM". On 10 December 2007, the Parliamentary Board of BJP formally announced that L. K. Advani would be its prime ministerial candidate for the general elections due in 2009. However, Indian National Congress and its allies won the 2009 general elections, allowing incumbent Prime Minister Manmohan Singh to continue in office. Following the defeat in the elections, L. K. Advani paved the way for Sushma Swaraj to become the Leader of Opposition in the Lok Sabha. Advani unexpectedly resigned from all his posts in the BJP on 10 June 2013 following the appointment of Narendra Modi as the head of the electoral campaign of BJP for the 2014 elections on 9 June 2013. He rued that the BJP was no longer the "same idealistic party" created by Shyama Prasad Mookerjee, Deendayal Upadhyaya, Nanaji Deshmukh and Atal Bihari Vajpayee. The BJP senior committee rejected his resignation on 10 June 2013. Ultimately, Advani withdrew his resignation on 11 June 2013 after Rajnath Singh (BJP President) assured Advani that his concerns about the functioning of the Party would be properly addressed.
Question: When was he in the prime minister candidacy?

Answer:
general elections, ending on 16 May 2009.