Get the latest tech news
Show HN: Tiny Moon – Swift library to calculate the moon phase
A tiny Swift library to calculate the moon phase for any given date, works super fast, and works completely offline. - mannylopez/TinyMoon
"Up to Next Major Version" ensures compatibility with future updates that don't introduce breaking changes. The ExactMoon object always returns the exact values for the specific date and time passed in. Used in astronomical calculations ( wikipedia)daysTillFullMoonIntReturns 0 if the current date is a full moondaysTillNewMoonIntReturns 0 if the current date is a new moondaysElapsedInCycleDoubleNumber of days elapsed into the synodic cycle, represented as a fractionageOfMoon(days: Int, hours: Int, minutes: Int)Age of the moon in days, minutes, hoursilluminatedFractionDoubleIlluminated portion of the Moon, where 0.0 = new and 1.00 = fullphaseFractionDoublePhase of the Moon, represented as a fraction.
Or read this on Hacker News