Solar alternatives and similar libraries
Based on the "Utility" category.
Alternatively, view Solar alternatives based on common mentions on social networks and blogs.
-
SwifterSwift
:A handy collection of more than 360 native Swift 3 extensions to boost your productivity. -
R.swift
Tool to get strong typed, autocompleted resources like images, cells and segues. -
SwiftGen-Storyboard
A tool to auto-generate Swift enums for all your Storyboards, Scenes and Segues constants + appropriate convenience accessors. -
SwiftGen
A collection of Swift tools to generate Swift code (enums for your assets, storyboards, Localizable.strings, …) -
swift-protobuf
A plugin and runtime library for using Google's Protocol Buffer. -
EZSwiftExtensions
How Swift standard types and classes were supposed to work. -
DifferenceKit
💻 A fast and flexible O(n) difference algorithm framework for Swift collection. -
LifetimeTracker
LifetimeTracker can surface retain cycle / memory issues right as you develop your application, and it will surface them to you immediately, so you can find them with more ease. -
Device
Light weight tool for detecting the current device and screen size written in swift. -
WhatsNew
Showcase new features after an app update similar to Pages, Numbers and Keynote. -
SwiftLinkPreview
It makes a preview from an url, grabbing all information such as title, relevant texts and images. -
PinpointKit
An open-source iOS library in Swift that lets your testers and users send feedback with annotated screenshots and logs using a simple gesture. -
SwiftyJSONAccelerator
OSX app to generate Swift 3 code for models from JSON. -
Highlighter
Highlight whatever you want! Highlighter will magically find UI objects such as UILabel, UITextView, UITexTfield, UIButton in your UITableViewCell or other Class. -
Compass
Compass helps you setup a central navigation system for your application. -
Playbook
📘A library for isolated developing UI components and automatically snapshots of them. -
ReadabilityKit
Preview extractor for news, articles and full-texts in Swift -
PDFGenerator
A simple Generator of PDF in Swift. Generate PDF from view(s) or image(s). -
Pythonic.swift
Pythonic tool-belt for Swift: a Swift implementation of selected parts of Python standard library. -
Prototope
Swift library of lightweight interfaces for prototyping, bridged to JS. -
Butterfly
A lightweight library for integrating bug-report and feedback features with shake-motion event.
Scout APM - Leading-edge performance monitoring starting at $39/month
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of Solar or a related project?
Popular Comparisons
README
Solar
A Swift helper for generating Sunrise and Sunset times.
Solar performs its calculations locally using an algorithm from the United States Naval Observatory, and thus does not require the use of a network.
Usage
Solar simply needs a date and a location specified as a latitude and longitude:
let solar = Solar(for: someDate, latitude: 51.528308, longitude: -0.1340267)
let sunrise = solar.sunrise
let sunset = solar.sunset
We can also omit providing a date if we just need the sunrise and sunset for today:
let solar = Solar(latitude: 51.528308, longitude: -0.1340267)
let sunrise = solar.sunrise
let sunset = solar.sunset
Note that all dates are UTC. Don't forget to format your date into the appropriate timezone if required.
Types of sunrise and sunset
There are several types of sunrise and sunset that Solar generates. They differ by how many degrees the sun lies below the horizon:
Official (~0°)
Civil (6° below horizon)
Nautical (12° below horizon)
Astronomical (18° below horizon)
For more information, see https://www.timeanddate.com/astronomy/different-types-twilight.html
Convenience methods
Solar also comes packaged with some convenience methods:
// Whether the location specified by the `latitude` and `longitude` is in daytime on `date`
let isDaytime = solar.isDaytime
// Whether the location specified by the `latitude` and `longitude` is in nighttime on `date`
let isNighttime = solar.isNighttime
Installation
Solar is available through CocoaPods and Carthage.
Cocoapods
To install, simply add the following line to your podfile:
pod "Solar"
Then run pod install
Carthage
Add the ceek/Solar
project to your Cartfile
github "ceeK/Solar"
Then run carthage update
License
The MIT License (MIT)
Copyright (c) 2016-2018 Chris Howell
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*Note that all licence references and agreements mentioned in the Solar README section above
are relevant to that project's source code only.