In some ways the Babylonian technology of reckoning time hearkens back to the paleolithic era. Just as their forebears of twenty thousand years ago, the Babylonians carefully observed the phases of the moon, and grouped days into approximately lunar months. Their knowledge of astronomy suggests that they had been observing and recording the movements of celestial bodies for hundreds of years. Texts from Hammurabi's time record the movement of the planet Venus through the constellations. As a matter of fact, the Babylonians and the Egyptians created the zodiac that we know today.
The Babylonian calendar was based upon lunar months of 29 1/2 days, a cycle that did not quite result in twelve months per year. This meant that an extra or "intercalary" month had to be inserted once every three years.