Please enable JavaScript to view this site.


str = MoonPhaseName(nMoonPhaseIndex)


This macro function returns the name of the Moon phase as specified in the current Moon and Sun options for the [mp] and [mt] tokens, and corresponding to the value nMoonPhaseIndex.


If you supply the value of nMoonPhaseIndex yourself, be sure to supply the correct index, as described here.


This value of nMoonPhaseIndex could have come from a previous call to MoonPhaseOf as shown in the example below.

nMoonPhaseIndex = MoonPhaseOf(nDate, 1, false)
switch nMoonPhaseIndex
   case 0
      sRESULT = 'No moon phase today'
      sRESULT = MoonPhaseName(nMoonPhaseIndex) + ' today'

See also: MoonPhaseAndTimeOf, MoonPhaseOf, MoonPhaseSymbol.


Topic 177675, last updated on 18-Apr-2020