str = PlanetInConstellationAbbreviation(nDate, nTimeOfDay, nPlanetID, nMoonSourceIndex, bTopocentric)
This macro function returns the abbreviation of the astronomical constellation in which the planet nPlanetID is, at nTimeOfDay on nDate, using the Moon data source of index nMoonSourceIndex.
•The allowed values for nPlanetID range from n_MERCURY to n_PLUTO, and also include n_SUN and n_MOON.
•The names and abbreviations of the constellations correspond to the 88 constellations recognized by the International Astronomical Union (IAU).
•If bTopocentric is true, the position is as seen from the location of the selected Moon data source. If it is false, the position is as seen from the centre of the Earth.
•The value of the parameter nTimeOfDay must be supplied to the function in one millionth of a day (less than 1/10th of a second), preferably using the function MillionFromHMS to avoid any error.
The macro code below gets the name and abbreviation of the constellation in which the Moon is at 7am on the date of an incoming macro token.
nTime = MillionFromHMS(7,0,0)
sName = PlanetInConstellationName(n_TokenDate,nTime,n_MOON,1,true)
sAbbrev = PlanetInConstellationAbbreviation(n_TokenDate,nTime,n_MOON,1,true)
sResult = 'Moon is in ' + sName + ' (' + sAbbrev + ')'
The function identifies the IAU constellation region containing the body's position. This is distinct from an astrological zodiac sign, which is defined by a division of ecliptic longitude.
See also: PlanetInConstellationID and PlanetInConstellationName.
Topic 179945, last updated on 11-Oct-2026