int = ZodiacSignAndTimeOf(nDate, nSunDataSourceIndex, bEveryday)
This macro function returns the index and time of the Zodiac sign into which the Sun enters on nDate, for the Sun data source of index nSunDataSourceIndex.
➢The result combines the Zodiac sign index and a time value: sign index × 1000000 + time in millionths of a day. Use div 1000000 to extract the sign index and mod 1000000 to extract the time, as shown in the code sample below.
The parameter bEveryday specifies if the function should give a result corresponding to the current Zodiac sign every day (bEveryday = true), or only on dates when there is a change of Zodiac sign (bEveryday = false).
If bEveryday is false, the function returns 0 on dates when no Zodiac sign change occurs. If bEveryday is true, it returns the current sign on those dates, with a time component of 0. In this case, zero does not represent a sign change at midnight. On dates when a sign change occurs, both settings return the new sign and the time of the change.
➢To determine whether a sign change occurs on a date, call the function with bEveryday set to false and check whether the complete result is nonzero.
The index extracted from the result corresponds to the following table. A complete result of 0 indicates that no event of the requested type occurs on nDate when bEveryday is false.
0 |
No change of Zodiac sign on nDate (only possible if bEveryday is false). |
|||
1 |
Aries |
7 |
Libra |
|
2 |
Taurus |
8 |
Scorpio |
|
3 |
Gemini |
9 |
Sagittarius |
|
4 |
Cancer |
10 |
Capricorn |
|
5 |
Leo |
11 |
Aquarius |
|
6 |
Virgo |
12 |
Pisces |
|
Extracting Zodiac Sign and Time
To extract the index and time from the result of this function, use the div and mod functions on the returned result, as shown in the code below.
nZodiacIndex = 0
nPhaseAndTime = ZodiacSignAndTimeOf(nRunDate,1,false)
// do we have a Zodiac change ?
if (nPhaseAndTime > 0)
nZodiacIndex = nPhaseAndTime div 1000000
nZodiacTime = nPhaseAndTime mod 1000000
endif
See also: ZodiacName, ZodiacSignOf and ZodiacSymbol.
Topic 177645, last updated on 11-Oct-2026