The most ancient one was probably lunar. However, it was eventually abandoned because of the difficulty in balancing the lunar year with the solar year.
Then, a solar calendar having a year of 365 days was adopted. This year was divided into twelve months of thirty days each. The five extra days were used to honour the star Sothis (Sirius).
A new calendar was introduced about 3100 BCE. It was exactly 365 days long, having twelve months of thirty days each plus five intercalary days. Each month was divided into three ten-day periods for the benefit of commerce.