Great addon, have been using it daily for months without problems. That is, until about two or three weeks back when sunrise/sunset calculation errors showed up.
My location is set to 12N57, 77E37 (near Bangalore, India), with sunrise/sunset at 7.5 degrees and timezone at Use System (IST, India, GMT +5 1/2 hours). Sometimes it shows wrong sunrise and sunset times, 05:50 and 18:00, though mostly it shows the correct times which is presently at around 06:18 and 18:30. Unable to make out any pattern to when it shows incorrect versus correct times. Most recently, it showed wrong times yesterday from about 5:30 to 6:30pm IST, then became correct from 6:30pm to when I last checked at 7:30pm, and it has been correct all day today so far, that is about 5am to 4pm.
Not sure if this is related, but on looking more closely, the next Full Moon and New Moon times also seem to be showing about 12 hours earlier than actual for this timezone.
CONFIRMED.
Some notes into my investigation so far:
Unfortunately the referenced book - Jean Meeus, "Astronomical Algorithms", which retails from Amazon.com currently at £200. Not exactly an impulse purchase.
/*
* Some of the algorithms for this have come from:
*
* Low-precision formulae for planetary positions
* Van Flandern & Pulkkinen, 1979
* Astrophysical Journal Supplement Series, vol. 41, Nov. 1979, p. 391-411.
*
* ATM see: http://adsabs.harvard.edu/abs/1979ApJS...41..391V
*
* Also referenced is - Jean Meeus, "Astronomical Algorithms", Willmann-Bell, 1991.
*
* Cf. with published data on Moon Times using "Astronomical Algorithms":
* http://eclipse.gsfc.nasa.gov/phase/phases2001.html
*
* NOTE: At present there seems a discrepancy in the values calculated here with Suncult,
* seemingly ranging from 1-16 hours earlier than the above published values.
* Hence, this can lead to Suncult stating Moon Times that are a day earlier than other systems/paper calendars/etc...
* eg. Suncult Full Moon calculated : 2012-03-07 ~ 16:00
* however from above NASA source : 2012-03-08 09:40
*/
Some more examples of Moon time discrepancies [assuming 'Other Sources' are all correct! :) ]
For example, today Fri 17 August in Sydney Australia, SunCult tells us:
SC: Next Full Moon: 01/09/2012 06:56
Other sources: Next Full Moon: 31/08/2012 23:57
SC: Next New Moon: 16/09/2012 00:55
Other sources: Next New Moon: 18/8/2012 01:54:
and in September:
Other sources: Next New Moon: 16/9/2012 12:10
Go through the time conversion routines, looking at how dates and time are handled.
Julian Date and modified Julian Date are 0.5 days, plus however many days between their respective start dates apart.(One of the books or articles I was reading about writing astrological software stated that the wrong Julian Date accounts for the majority of errors in astrological software. It also claimed that the second most common error, was incorrect time conversion. UTC to Local Sidereal Time, and vice versus being where most time conversion errors are made.)
If I knew how to clone the SVN repository on my system, I'd walk through the code, instead of pointing to the most common errors. (I also have three or four books on writing astronomical software, which I'd use to fix any bugs I find.)
You can browse the code on-line - the main bulk of the logic is here:
https://sourceforge.net/p/suncult/code/HEAD/tree/trunk/src/content/suncult/calculations.js
Just a quick note regarding the Moon times, is that SunCult uses a quite naive method to determine the phase and time to Full/New Moon.
In calculations.js the core function phasePercent() basically uses the difference in the supplied date to the date of a known New Moon in 2005 and applies a fixed synodic value of 29.53058867 days to this difference in an attempt to see how far through a synodic cycle this date is.
However, of course the lunar cycle is not a fixed value - ranging from roughly 29.2 to 29.9 days.
See https://en.wikipedia.org/wiki/Lunar_month and also https://en.wikipedia.org/wiki/Lunar_phase
So any particular date calculated by SunCult may be increasingly inaccurate, especially the further away from the reference date of 2005.
So the quick and dirty fix would be to update the reference date to the present day value (e.g. UTC 2022-02-01 05:46).
Note other software such as libnova - https://sourceforge.net/projects/libnova/ or
DeepSkyLog - https://github.com/DeepskyLog/DeepskyLog
use a more accurate algorithm for Moon phases and dates.
Since SunCult is effectively obsoleted due to changed nature of the Firefox API removal of XUL plugin support - although other browsers exist that allow XUL - I personally don't use them - thus I won't be modifying SunCult any time soon.