A Swift micro library for generating sunrise and sunset times locally using astronomical algorithms.
Solar is a Swift micro library that generates sunrise and sunset times for any location and date. It solves the problem of needing accurate solar calculations without relying on network services by implementing the United States Naval Observatory algorithm locally.
iOS and macOS developers building apps that require solar time calculations, such as weather applications, photography tools, outdoor activity planners, or any app needing daylight awareness.
Developers choose Solar for its offline capability, lightweight implementation, and accurate astronomical calculations without external dependencies. It's specifically designed for Swift ecosystems with support for multiple package managers.
A Swift micro library for generating Sunrise and Sunset times.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses the United States Naval Observatory algorithm to compute times entirely offline, eliminating network dependencies and ensuring functionality without internet access, as highlighted in the README.
Provides four types of sunrise/sunset (official, civil, nautical, astronomical) based on sun position below the horizon, with external references for clarity, making it versatile for different use cases.
Designed for Swift with support for CocoaPods, Carthage, and Swift Package Manager, making installation straightforward for iOS/macOS projects, as detailed in the installation section.
Includes properties like `isDaytime` and `isNighttime` for easy boolean checks on daylight status, simplifying common tasks without extra code.
Returns all times in UTC without built-in timezone conversion, requiring additional code for local display, which the README explicitly notes as a manual step.
Focuses solely on sunrise/sunset calculations with twilight variations, lacking other common features like moon phases, solar noon, or detailed solar azimuth, which might necessitate additional libraries.
Tied to Swift and Apple's ecosystems (iOS/macOS), making it unsuitable for web, Android, or cross-platform projects without significant workarounds.