How to calculate the phase of the moon very, very badly!
summary
A lunar calendar app called Luna initially uses 27.321661 days (sidereal month) and drifts three days over 18 months; swapping in the average 29.530587981 days (synodic month) still fails because individual months vary. The fix is replacing naive arithmetic with a copied GitHub function that returns exact illumination fraction, and ditching the Weather Icons 28 slices bucketing. The rebuilt code computes midnight boundaries for phase moments, ends duplicated full moons, and yields accuracy within minutes to hours after three years and small user testing.
AI-written summary · about
chapters (7)
- 0:00Lunar cycle myth
- 2:27Flawed sidereal month
- 4:34Synodic month error
- 6:45Why averages fail
- 8:5328-icon bucketing disaster
- 10:19Midnight boundary solution
- 11:22Final accuracy








