For this chain-of-thought reasoning and answer, what was the question?
The relevant information to answer the above question is: It came into being on 31 May 1910 with the unification of four previously separate British colonies: the Cape, Natal, Transvaal and Orange River colonies.
A: 31 May 1910
Q: The Union of South Africa (Dutch: Unie van Zuid-Afrika, Afrikaans: Unie van Suid-Afrika) is the historic predecessor to the present-day republic of South Africa. It came into being on 31 May 1910 with the unification of four previously separate British colonies: the Cape, Natal, Transvaal and Orange River colonies. It included the territories formerly part of the Boer republics annexed in 1902, the South African Republic and the Orange Free State.

Based on this passage, when was the union of south africa formed?