UPDATE:
8/07/2022 ... HOWL AT THE MOON ALL YA WANT, BUT THIS PAGE SHOULD NOT TO BE USED FOR NAVIGATION :o)

The PHP Moon Phase is done with a PHP script that I keep 'tweaking' to calculate the current moon phase based on a preset date for each known New Moon in each month for the year.

The New Moon being 'ground zero' or the starting point, it is then calculated to its next current phase based on how many days the Moon takes to complete a full cycle.

A New Moon and Full Moon only last about a day in this program where the other phases last around 3 days each.
UPDATE:
01/01/2023 ... An interesting side note is that a new year worth of New Moon data can't be ushered in until the first New Moon Date in the New Year has arrived based on the New Moon occurrence date from the previous month in the last year.

This sounds obvious now in hindsight but it threw me a PHP 'curve ball' and took an hour to figure out why the program wasn't working as January 1st 2023 arrived.

In the end, I was trying to start the New Year with the first date of the first New Moon in the month of January 2023.

What I needed to do, was continue to use the last New Moon occurrence date from the previous month, of the previous year, as the new reference point in the New Year.

Geepers, what an ordeal.

The program should be back on track to accuratley track the Moon and its phases.

The image of the moon phase is created by overlapping a 'transparent' image of the shadow region over a fixed HD background image of a full moon in an HTML table.
In all, there are four different images: a 'left arching shadow', a 'right arching shadow' a New Moon shadow ( which is just a large circle ) and a Full Moon.

It should be noted that the 'large circle' shadow image is also used to display both the waxing and
waning crescent Moon shadow image.

During the process of tweaking this program, it was fun to go outside at night, look up and check the
current Moon phase of the Moon in the sky, then adjust the Moon shadow percentage in the program
accordingly. The website: MOONGIANT.COM was a great asset as well.

Once each Moon phase shadow percentage had been set, the program does not need adjusting.

Only one (or less) shadow image is used at one time, depending on the phase of the moon.

During a Full Moon, only the single Full Moon image is displayed.

In order to create the other moon phase images, the PHP program displays the 'arching shadow' image over the full moon image, based on a preset amount of how much of the Moon should be exposed.

The transparent 'arching shadow' ( depending if the moon is in waxing or waning phase ) is then 'stretched acoss' the full moon image creating the current moon / shadow phase.

================================================================================================

Try it yourself ... use your mouse and "grab" a shadow image below and drag it across the full moon image.
You will see how the moon phase shadows are created on the surface of the moon.


[Home]