Please enable JavaScript to view this site.

 

int = HeliacalEventOnDate(nDate,nSunSourceIndex,nPlanetOrStarID,nEventType)

 

This macro function returns the time when a heliacal event of type nEventType occurs on nDate, for the astronomical body nPlanetOrStarID, using the sun data source of position nSunSourceIndex.

 

The possible values for nPlanetOrStarID are given in the topic astronomical bodies indices.

The 4 possible choices for nEventType are: heliacal rise (nEventType=1), heliacal setting (nEventType=2), acronycal rise (nEventType=3), and acronycal setting ( (nEventType=4).

The result is the time of the day expressed in one millionth of a day (less than 1/10th of a second).

If a heliacal event of nEventType involving the astronomical body nPlanetOrStarID, does not occur on nDate, then the function returns -1.

 

The macro code below uses HeliacalEventOnDate to look for the Maori New Year (Matariki), which corresponds to the new Moon which follows the heliacal rise of the Pleiades star cluster.

nEventType = 1 // heliacal rise
nAstroBody = 29 // Alcyone, the brightest star in the Pleiades
// look from mid-May to the end of June
nHeliacalDate = 0
for nRunDate = EncodeDate(nYear,5,15to EncodeDate(nYear,6,30)
   nHeliacalTime = HeliacalEventOnDate(nRunDate,1,nAstroBody,nEventType)
   if nHeliacalTime >= 0
      nHeliacalDate = nRunDate
      break // found it
   endif
endfor
Assert(nHeliacalDate > 0'heliacal event not found', true)
// now look for the new Moon that follows
nMatarikiDate = 0
for nRunDate = nHeliacalDate to EncodeDate(nYear,6,30)
   nNewMoonTime = MoonPhaseAndTimeOf(nRunDate,1,false)
   // do we have a phase and if so a new Moon ?
   if (nNewMoonTime > 0and (nNewMoonTime div 1000000 == 1)
      // if the new Moon is on the exact date of the heliacal rise
      // make sure that the time of the new Moon is after it
      if nRunDate == nHeliacalDate
         // New Moon must be after heliacal rise
         if (nNewMoonTime mod 1000000) > nHeliacalTime
            nMatarikiDate = nRunDate
            break // found it
         else
            // too early keep looking for the next new Moon
         endif
      else
         nMatarikiDate = nRunDate
         break // found it
      endif
   endif
endfor
Assert(nMatarikiDate > 0'Matariki not found', true)
// at the end
sResult = 'Maori New Year on ' + FormatDate('Dddd, Mmmmm d, yyyy', nMatarikiDate)

See also: astronomical bodies indices and planetary events indices.