«
dbrowse
Selected Data
This node is informative, descriptive, functional and terminating.
[definitions]
Query Path
Interactive Path
Description of Results
While perhaps not as old as the moon itself, the history behind the data in the MySQL moon_phases
table stretches (to my knowledge at least) as far back as 1987. It began life as the C program moontool.
Along the way, various folks have ported it to Java, VB and, in 1998, to Perl
by Raino Pikkarainen. These days you can find the Perl version on CPAN as Astro::MoonPhase,
which is now maintained by Brett Hamilton of simple.be.
The idea behind this table is to avoid some heavy-duty floating point calculations at run-time. As you can see from the results, they come back pretty quickly. So, for any requested month in the calendar, I use this table to determine which days any of these moon phases falls on:
- :: Last Quarter Moon
- :: New Moon
- :: First Quarter Moon
- :: Full Moon
- :: Blue Moon
A little later on this year I plan on publishing an article on the last, rare, and misunderstood Blue Moon. Hint: check your calendars for August 2005. Folks that are interested in using this data for their own applications will find the following resources helpful:
mysql>create tablemoon_phasessyntax.- popmoon.pl (Perl script to populate the table).
- upblue.pl (Perl script to update full moons that are blue).
- mysql.pl (sample DBI/DBD/MySQL connection parameters script).
- moon_phases.sql.gz (gzip compressed table schema/data dump).
- gzip: FreeBSD man page.
- gzip: Home page.
See also: the seasons table and data.
Node/View
| mysql> select * | |
|---|---|
| mysql> from dcal.moon_phases | |
| mysql> where year(date)=2008 and month(date)=08; | |
| date | phase |
| 5 rows in set (0.0041 seconds) | |
| 2008-08-01 | New Moon |
| 2008-08-08 | First Quarter Moon |
| 2008-08-16 | Full Moon |
| 2008-08-23 | Last Quarter Moon |
| 2008-08-30 | New Moon |




















































































