{"by":"mannylopez","descendants":35,"id":41069681,"kids":[41075821,41073671,41073118,41071376,41075894,41070301,41075824,41070944,41074328,41072463,41071959,41072570,41077750],"score":106,"text":"Tiny Moon is a tiny Swift library to calculate the moon phase for any given date, works super fast, and works completely offline.<p>All of this started when I realized that we only have 12, sometimes 13, full moon&#x27;s in a year. That doesn’t seem like that many.<p>I set out to build a MacOS app to remind me when a full moon occurs, so that I could take a moment and step outside to appreciate it.<p>The MacOS app I ended up creating can be found at <a href=\"https:&#x2F;&#x2F;apps.apple.com&#x2F;us&#x2F;app&#x2F;tiny-moon&#x2F;id6502374344\" rel=\"nofollow\">https:&#x2F;&#x2F;apps.apple.com&#x2F;us&#x2F;app&#x2F;tiny-moon&#x2F;id6502374344</a> along with the source code [0], all powered by the Tiny Moon library.<p>I knew that I wanted the app to work offline, so working with a network request was out of the picture. Taking inspiration from SunCalc [1] and Moontool for Windows [2], I decided to create my own library and wrote Tiny Moon as a Swift Package to power my app.<p>The app tries to be as minimal as possible, does what it does very fast, and works completely offline.<p>[0] <a href=\"https:&#x2F;&#x2F;github.com&#x2F;mannylopez&#x2F;TinyMoonApp\">https:&#x2F;&#x2F;github.com&#x2F;mannylopez&#x2F;TinyMoonApp</a><p>[1] <a href=\"https:&#x2F;&#x2F;github.com&#x2F;mourner&#x2F;suncalc\">https:&#x2F;&#x2F;github.com&#x2F;mourner&#x2F;suncalc</a><p>[2] <a href=\"https:&#x2F;&#x2F;www.fourmilab.ch&#x2F;moontoolw&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;www.fourmilab.ch&#x2F;moontoolw&#x2F;</a>","time":1721920621,"title":"Show HN: Tiny Moon – Swift library to calculate the moon phase","type":"story","url":"https://github.com/mannylopez/TinyMoon"}