The International Date Line is the imaginary line on the Earth that separates two consecutive calendar days. That is the date in the Eastern hemisphere, to the left of the line, is always one day ahead of the date in the Western hemisphere. It has been recognized as a matter of convenience and has no force in international law.
Without the International Date Line travelers going westward would discover that when they returned home, one day more than they thought had passed, even though they had kept careful tally of the days. This first happened to Magellan's crew after the first circumnavigation of the globe. Likewise, a person traveling eastward would find that one fewer days had elapsed than he had recorded, as happened to Phileas Fogg in "Around the World in Eighty Days" by Jules Verne.
The International Date Line can be anywhere on the globe. But it is most convenient to be 180° away from the defining meridian that goes through Greenwich, England. It also is fortunate that this area is covered, mainly, by empty ocean. However, there have always been zigs and zags in it to allow for local circumstances.
Historical positions of the International Date Line from "Notes on the History of the Date or Calendar Line," in The New Zealand Journal of Science and Technology, Vol. XI, pp. 385 - 388
Over the years, the position of the International Date Line has changed several times. Until 1845, the Philippines were on the eastern side of it (the same side as the United States). It was on the eastern side of the line because it was a Spanish colony and most Europeans arrived there via the Spanish colonies in South America. Indonesia, almost directly to the South of the Philippines, was a Dutch colony and most European arrivals came via the Cape of Good Hope. Thus Indonesia was to the west of the International Date Line. After the independence of the South American countries, most people traveling to the Philippines also came by way of the Cape of Good Hope, so it was decided to change from the east of the line to the west of the line. Alaska, originally claimed by Russia, was to the west of the International Date Line because most travelers arrived there by way of Siberia. When the United States bought Alaska in 1867 the line was moved to the west of it. The most recent change in the line was in 1995 when Kiribati moved a large segment of it to the east, so that the entire nation would be on the same side of the International Date Line. As with all other changes in the International Date Line, the change was made by a government with local interests. As a result, the line is as far East as 150°, farther east than Honolulu. This does not change where the first sunrise of the next millennium will occur, however. The honor still goes to Antarctica.
The position given on most maps is the line drawn by the British Admiralty in 1921.