π MoonKit Is a short framework to get information about the moon
MoonKit is available through SPM. To install it, follow the steps:
Open Xcode project > File > Swift Packages > Add Package Dependecy
After that, put the url in the field: https://github.com/thejohnlima/MoonKit.git
MoonKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'MoonKit'
and run pod install
Import library in your file:
import MoonKit
let date = Date()
let moon = Moon(date)
let info = moon.info
print(info.phase) // Example: Full Moon
print(info.age) // Example: 14
print(info.isLeapYear) // Example: true
MoonKit is under MIT license. See the LICENSE file for more info.