Just as a year can be defined relative to the stars or the sun, so can a moon's orbital period. The length of time it takes the moon to complete one orbit around the Earth is 27.32166 days. From an Earth-bound observer's point of view, this is the time it takes the moon to return to the same place relative to the stars, and is called the sidereal month.
I wrote this applet back in 1998 to answer a question that was bugging me while I was plotting out a historical novel (which perhaps I'll finish some day, if I ever have time): what would the calendar have looked like at a particular date in the distant past? This isn't just a matter of calculating Easter and the feasts like Pentecost that depend on it. Saints' days change over time as new ones come along and old ones fall out of favor or are moved. Also, different regions may celebrate the same saint on a different day. Rather than simply look up things for the particular place and time I was dealing with, I decided to create a general-purpose solution.
An alternative to measuring the passage of the sun through a fixed point (equinox or solstice) would be to measure the appearance of a particularly prominent star or constellation, either just before sunrise or just after sunset. These events are called heliacal rising and setting and will yield a period that is fairly close to the mean tropical year.
If you are a farmer, an arbitrary period has its problems. Of particular interest is the best time to plant crops—an activity tied to the seasons, which are in turn linked to the earth's revolution around the sun. If all you have is an arbitrary cycle, it's much more difficult to tell just when you should plant. Some agricultural societies, therefore, have tried to link their calendar to the length of the time it takes the earth to rotate around the sun. Of course most agricultural societies have not known that the earth orbits around the sun.
The next simplest possibility for a calendar (although not necessarily for the people using it) is a cycle of days of arbitrary length. The calendar can proceed by simply counting days, over and over, ad infinitum. We have just such an arbitrary cycle in our week. Notice that the cycle of week days runs independently of our other cycles of month and year. Another example is the nundinae, an 8-day interval used in the Roman republic. An arbitrary cycle need not be quite so simple (the Maya have a 260-day count), but its advantage is that we need not bother adjusting our calend
The period which has generally been taken as basic for all calendars is the day (one alteration of light and darkness). To be more precise, the day to which we refer here is the solar day i.e., the length of time it takes the sun to reach the same spot in the sky again. Astronomers have traditionally used the sun's zenith, i.e. noon, as the reference point, because it can be most accurately measured, and because an entire night's observations can be recorded as occurring on a single day.
The table below lists official adoption dates, with as much precision as I've been able to discover. Simply because the government told people to convert, however, does not mean they did so. Because of religiously inspired opposition to the conversion, both calendars were often in use in regions where there was a religiously mixed population.
I welcome comments about this program. To forestall answering the same questions repeatedly, here are some notes about how I calculate the dates. If you have questions about how to use the applet, see the help file. I intend this calendar to have a certain degree of historical accuracy, but there are certain simplifications you should be aware of.
Most moveable feasts are based on Easter. The Easter algorithm I use is an implementation of the formula devised by Zeller, which correctly generates Easter dates both before and after the Gregorian shift. After the Gregorian shift, Easter differs depending upon the locale you select. The "Eastern" locale uses the Orthodox method, which calculates Easter in the Julian calendar (as if the shift had never occurred). All other locales use the Western method, which not only takes the vernal equinox based on the Gregorian calendar, but also makes an adjustment to the lunar calendar used to determine the date of the full moon.
The calender modifications I've discussed so far only involve the civil calendar. Although today we think of the Gregorian reform as a correction of the solar (Julian) calendar, at least as important to those who enacted the reform was the correction to the lunar calendar used to track the Easter months. In attempts at calendar reform before the Gregorian, the lunar months were most frequently the target, probably because it was felt much easier to reform the part of the calendar only used by churchmen, rather than one deeply entrenched in civil life.
In 1582, Pope Gregory XIII decreed a modification to the Julian calendar. The reform consisted of a one-time correction in the date (skipping some days in the calendar) along with some tweaks to the rules of the calendar itself. For the civil calendar, the only substantive change was to omit 3 leap days every 400 years (in years evenly divisible by 100 but not 400, e.g., 1700, 1800, 1900, but not 2000). There were also changes to the way that the age of the moon was calculated for the purposes of finding the date of Easter.