### Search

 Search DelphiForFun.org only

### Support DFF

If you shop at Amazon anyway,  consider using this link. We receive a few cents from each purchase.   Thanks.

### Support DFF

If you benefit from the website,  in terms of knowledge, entertainment value, or something otherwise useful, consider making a donation via PayPal  to help defray the costs.  (No PayPal account necessary to donate via credit card.)  Transaction is secure.

### Contact

 Search DelphiForFun.org only

### Problem Description

"Once in a Blue Moon" is a phrase indicating the rare occurrence of a condition or event.  A program to calculate the occurrence of Blue Moons is the objective of this exercise.

### Background & Techniques

The information used in this description and in the program are based on  my interpretation of information found on the Web, largely from Wikipedia articles. "Once in a Blue Moon" is an English or at least American phrase meaning "not very often". The program explores how often they actually occur under one of the two common definitions, neither of which actually depends on the color of the moon.

The astronomical definition is based on seasons of the year; specifically a "Blue Moon" is the 3rd full moon in a season (Spring, Summer, fall, or Winter) which has 4 full moons. Since lunar months are shorter than calendar months, there are occasionally 13 full moons in a year. In those years, there must be 4 full moons in some season and a Blue Moon occurs.

A second common definition is calendar based and simpler to state. A blue moon under this definition is the 2nd full moon in a month. Full moons and seasons occurs  at different local times depending on one's east-west location, however calendar days always change at 12:00 Am local time.  This makes is possible for two full moons, (and therefore a Blue Moon under this definition), may occur in a particular calendar month in one  time zone but not in a neighboring time zone.

Back to the season based definition, our program faced two sub-problems: "When exactly do the seasons change?". And similarly "When exactly do the full moons occur?". Most everyone knows that the summer and winter, (the "solstices"), start on days with the most and fewest daylight hours respectively and spring and fall, (the equinoxes), begin on the two days per year when the sun crosses the equator and hours of daylight and darkness are about equal. Note that both seasons and full moons occur at an exact moment and since it's the third full moon that counts, the local times of these events may vary, but will always occur in the same season regardless of the timezone.

We have seasons because the earth is tilted on its north-south axis relative to the path of our annual path around the sun (named the "ecliptic"). Of the various astronomical measurement systems, the "ecliptic" system is most convenient for purposes of defining seasons. As we follow the ecliptic, the north end of the earth's axis is sometimes angled toward the sun (spring and summer for those of us in the northern hemisphere) and sometimes away (our fall and winter). Southern hemisphere season are exactly the opposite. The measure of the apparent sun position on the ecliptic for any date is it's "ecliptic longitude". The 0° ecliptic longitude is assigned to the date and time when the sun crosses over the equator on its way north. By convention, this is the date/time of the Vernal (spring) equinox and labeled as 0°  From this point and moving counterclockwise, the other seasons begin at 90 degree increments (90° degrees for Summer Solstice, 180° for the Fall Equinox, and 270° for the Winter Solstice. We have a set of Astronomy procedures on the DFF website which return the Ecliptic Longitude for any date and time. This program tests dates at 1 minute increments around the season begin date to find the date and time whose ecliptic longitude is nearest to the target ecliptic longitude.

Full moons similarly are defined as the instant when the moon's ecliptic longitude differs from the sun's ecliptic longitude by 180 degrees. By comparing season start times and full moon times, when can assign every full moon to a season. When there are 4 moons in a season, we report the 3rd one as a "Blue Moon".

Calendar months with two full moons are also identified for those who prefer that definition.

### Running/Exploring the Program

 Download  executable Download source  (Note: the UAstonomy unit which now resides in our library zip file of commonly used units.  Library file DFFVLIB14 or later is required to recompile this program ) Download current library file (DFFLibV14) required to recompile BlueMoons program.

### Suggestions for Further Explorations

 ???

 Original:  July 5, 2012 Modified:  July 06, 2012