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 as shown in the image on the right 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'
   else
      sRESULT = MoonPhaseName(nMoonPhaseIndex) + ' today'
endswitch

See also: MoonPhaseAndTimeOf, MoonPhaseOf, MoonPhaseSymbol.

 


Topic 177675, last updated on 08-Apr-2026