We know little about the details of timekeeping in prehistoric eras, but wherever we turn up records and artifacts, we usually discover that in every culture, some people were preoccupied with measuring and recording the passage of time. Ice-age hunters in Europe over 20,000 years ago scratched lines and gouged holes in sticks and bones, possibly counting the days between phases of the moon. Five thousand years ago, Sumerians in the Tigris-Euphrates valley in today's Iraq had a calendar that divided the year into 30 day months, divided the day into 12 periods (each corresponding to 2 of our hours), and divided these periods into 30 parts (each like 4 of our minutes). We have no written records of Stonehenge, built over 4000 years ago in England, but its alignments show its purposes apparently included the determination of seasonal or celestial events, such as lunar eclipses, solstices and so on.
The earliest Egyptian calendar [Ref.] was based on the moon's cycles, but later the Egyptians realized that the "Dog Star" in Canis Major, which we call Sirius, rose next to the sun every 365 days, about when the annual inundation of the Nile began. Based on this knowledge, they devised a 365 day calendar that seems to have begun around 3100 BCE (Before the Common Era), which thus seems to be one of the earliest years recorded in history.
Before 2000 BCE, the Babylonians (in today's Iraq) used a year of 12 alternating 29 day and 30 day lunar months, giving a 354 day year. In contrast, the Mayans of Central America relied not only on the Sun and Moon, but also the planet Venus, to establish 260 day and 365 day calendars. This culture and its related predecessors spread across Central America between 2600 BCE and 1500 CE, reaching their apex between 250 and 900 CE. They left celestial-cycle records indicating their belief that the creation of the world occurred in 3114 BCE. Their calendars later became portions of the great Aztec calendar stones. Our present civilization has adopted a 365 day solar calendar with a leap year occurring every fourth year (except century years not evenly divisible by 400).