int = TithiTimeOf(nWesternDate, nMoonSourceIndex, bSecondTithiIfExists)
•The result is the time of the day expressed in one millionth of a day (less than 1/10th of a second).
•You can call this function with bSecondTithiIfExists set to true to check if there are 2 tithis in the same western day nWesternDate (ie. a leap day). This not common, but it does happen a few times a year.
•If there are no tithis in the day nWesternDate (ie. an expunged day), then the function returns -1. This not common, but it does happen a few times a year.
The macro code below checks if a date is the date of the Deepavali holiday of southern India (there are a few more subtleties in the actual calculation, but the code below gives the gist of it).
nCurTithiNumber = TithiNumberOf(n_TokenDate, 1, false)
nCurTithiTime = TithiTimeOf(n_TokenDate, 1, false)
nCurSunrise = SunRiseSetTimeOf(n_TokenDate, 1, 0)
bIsDeepavali = (nCurSunrise > nCurTithiTime)
bIsDeepavali = (nCurSunrise < nCurTithiTime)
bIsDeepavali = false
See also: TithiNumberOf.