erndev / edsunriseset Goto Github PK
View Code? Open in Web Editor NEWObjective-C class to calculate Sunrise/Sunset/Twilight times.
License: Other
Objective-C class to calculate Sunrise/Sunset/Twilight times.
License: Other
Previously, I was getting correct sunrise and sunset hours. The times for sunrise and sunset don't make any sense, they are hours between each other. I'm getting correct coordinates from CoreLocation so this issue is confusing.
EDSunriseSet *sunriseSet = [EDSunriseSet sunrisesetWithDate:[NSDate date] timezone:[NSTimeZone localTimeZone] latitude:location.coordinate.latitude longitude:location.coordinate.longitude];
NSDateComponents *sunrise = sunriseSet.localSunrise;
NSDateComponents *sunset = sunriseSet.localSunset;
In installed EDSunriseSet using pod but I get 0.0.1 version. Do you plan to update it to 0.0.2?
The podspec needs to be updated to 2.0 to work correctly with the new API.
Is it possible to get the same values as the Sun but for the Moon ?
Thanks to this library I can get the Sunset and Sunrise value easily, it works great, I would like to know if the implementation for the Moon can be easily done ?
I’ve recently added EDSunriseSet
to the CocoaPods package manager repo.
CocoaPods is a tool for managing dependencies for OS X and iOS Xcode projects and provides a central repository for iOS/OS X libraries. This makes adding libraries to a project and updating them extremely easy and it will help users to resolve dependencies of the libraries they use.
However, EDSunriseSet
doesn't have any version tags. I’ve added the current HEAD as version 0.0.1, but a version tag will make dependency resolution much easier.
Semantic version tags (instead of plain commit hashes/revisions) allow for resolution of cross-dependencies.
In case you didn’t know this yet; you can tag the current HEAD as, for instance, version 1.0.0, like so:
$ git tag -a 1.0.0 -m "Tag release 1.0.0"
$ git push --tags
(I copied this text from the CocoaPods wiki)
Hi Ernesto, great library!
It seems like midnight sun and polar night is not supported. Could you add support for that? I live in Norway, so a large portion of my user base have midnight sun of polar night a large portion of the year.
http://en.wikipedia.org/wiki/Midnight_sun
http://en.wikipedia.org/wiki/Polar_night
Seems like the simplest way is to check whether sunrise = sunset. If that is the case, the sun is not rising or setting that day. Then it should be easy to figure out which is the case. If winter, the sun is not rising. If summer, the sun is not setting. Not sure what values should be returned to indicate that a particular day has a midnight sun or is a polar night though.
Daniel
EDSunriseSunset.m line 447 - bracket is misplaced. Instead of
tsouth = 12.0 - [self rev180:(sidtime - sRA)/15.0];
it should be
tsouth = 12.0 - [self rev180:sidtime - sRA] / 15.0;
With this error, the sunrise/set dates can be off by a full day.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.