Moon

Purpose

This subroutine accepts an input date, and returns into the variables you provide, the values of various moon phase data points including the dates of the new and full moon, the current cycle value, and the moon phase description.

Parameters

Parameter: dateStart
Type: date
Description: This is the date for which you wish to retrieve moon phase information.

Parameter: NewMoon
Type: date
Description: After the sub-routine completes, this variable will contain the date of the new moon relative to the provided starting date.

Parameter: FullMoon
Type: date
Description: After the sub-routine completes, this variable will contain the date of the full moon relative to the provided starting date.

Parameter: Cycle
Type: Integer
Description: After the sub-routine completes, this variable will contain the value of the moon cycle on the date provided by the starting date.

Parameter: Description
Type: string
Description: This is the name of the current moon cycle.

Returns

None

Example

Sub Main(parm as object)

    Dim dtStart as Date = Now
   Dim NMoon as Date
   Dim FMoon as Date
   Dim CurCycle as Integer
   Dim sDesc as String = ""

        hs.Moon(dtStart, NMoon, FMoon, CurCycle, sDesc)
       hs.WriteLog("Moon","New on " & NMoon.ToShortDateString & ", Full on " & FMoon.ToShortDateString & _
                         ", Cycle is " & CurCycle.ToString & " = " & sDesc)

End Sub

The above example returns:

Moon - New on 8/24/2006, Full on 9/7/2006, Cycle is 24 = Waning Crescent