Days are simply the amount of time required for our old earth to turn once on its axis in respect to the sun. But determining when the day begins or ends is at once arbitrary and according to custom.
Some ancients believed that the day began at sunrise; others believed a new one started at sunset. But there’s a drawback to beginning the day at either of these two easily observible solar positions. That’s because the actual amount of time within the day continually changes from one to the next. We allude to this by sometimes saying that days are getting longer (and other times, shorter).
But we no longer look to the sun to determine when one day has ended and another has begun. Instead, we use Atomic Time. That system defines a second as the duration of 9,192,631,770 cycles of radiation that corresponds to the transition between two hyperfine levels of the ground state of cesium 133. * You can read more details about this subject at Measuring Time Within the Day.
All historical peoples either invented the week or copied it from others, because a time unit longer than a day but smaller than a month is essential to human affairs. **
Some African groups had weeks of four days, possibly in honor of the four seasons. Early Romans had weeks of eight days—around that same time Greeks and Egyptians divided their 30-day months into three 10-day weeks. You can find out how our current week-length came about at Origin of the 7-day week.
Now, at least among major nations of the world, the seven-day week is universal. Attempts to change week-lengths in modern Western societies have been made at least twice but failed.
In 1792 the French Revolutionary Convention enacted a decimal calendar that called for 10-day weeks. It was abandoned after Napoleon came to power.
In the last century the U.S.S.R. tried twice to alter the week, decreeing its length as five days in 1929 and six days in 1932. For whatever reason, by 1940 the U.S.S.R. had restored the seven-day week.
* Systems of Time
** Bickerman, Elias Joseph. Chronology of the Ancient World.
Ithaca, N.Y.: Cornell University Press, 1968. p. 58.