​The correct answer is actually 1947
Here's a paragraph from Wikipedia
The Indian Independence Act 1947 (1947 c. 30 (10 & 11. Geo. 6.)) is an Act of the Parliament of the United Kingdom that partitioned British India into the two new independent dominions of India and Pakistan. The Act received the royal assent on 18 July 1947, and Pakistan came into being on 15 August at the same time as Indian independence. However, due to viceroy Lord Mountbatten's need to be in New Delhi for the transfer of power, Pakistan celebrated its formation a day ahead on 14 August 1947 to enable him to attend both events.