This is a sort decription of the calendar system used in ancient Athens. Currently there is no info here for the Julian and Gregorian calendars.
In ancient Greece there was no single, common calendar but instead every city-state had its own calendar system. The relatively more known one is the calendar system of Athens. It comprised of 12 moon-based months, each having 29.5 days on average. In practice that meant that each year had 6 months of 30 days and 6 months of 29 days placed in an alternating fashion.
Each month was divided in three parts, having 10/10/10 or 10/10/9 days each, depending on whether the month in question was a full month (30 days) or not (29 days). The days within a month were generally referred to using their order in their respective part of the month, with the exception of the first (noumhinhia - 1st day) and the last (henhi or nhea - old or new moon) days of each month. So, for example, the 12th day of the month was deftera mhessountos - 2nd day of the middle part. An interesting detail is that the days of the last part of each month were named in decreasing order, i.e. the 23rd day was ogdoi - eighth day - or ebdomhi - seventh day, depending on whether the month had 30 or 29 days respectively!
Based on the above, each year had 354 days. In order to keep the moon-cycle-based year in agreement with the seasons (i.e. the sun-cycle-based year), an extra month was added to each 2nd, 5th and 8th year of an 8-year cycle. This cycle of 8 years corresponded to an average year of 365.25 days each. This way of correction still led to observable shifts of the used cycle compared to a sun-based cycle. Thus, Mheton suggested a cycle of 19 years having a total of 235 months, 125 of them having 30 days and 110 having 29 days. However, in Mheton's system the months of 30 and 29 days were not alterating, but instead each 64th day was ommited. Thus, Mheton's average year was approx. 365 days, 6 hours, 18 min and 56.84 sec. Mheton's proposal was publicly accepted and calendars with a cycle of 19 years were created and published.
Mehton's cycle differed from the sun cycle by 7.5 hours. To correct this, Kalhipos in, 330 BC, proposed the use of a 76-year cycle containing one day less than before. His suggestion was accepted by the astonomers of the era but was never practically applied. To further improve the accuracy of the calendar system, Hiparchos, in 150 BC, suggested the use of 304 years cycle containing 3760 months, 1795 of which having 30 days and 1965 containing 29 days. Even with than correction, though, there was still an error of 1 day per 222 years.
Apart from defining ways to measure time and divide the year, another problem was to specify a commonly accepted reference point to be used as a starting time-point. Important historical events were often used as reference points. In the 3rd century BC, the year of the Olympic games in 776 BC started to be used as a reference point, by Alexandrian writers, and this practise continued to be in use until about the 4th century AD.
NB: This information was based on various web sources and the encyclopedia HELIOS.