Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Objective-C Library for Sunrise and Sunset?

Is there an Objective-C (or C) library (that is compatible with core location) that can tell me the time of sunrise and sunset for any given calendar day?

like image 551
Moshe Avatar asked Nov 05 '10 01:11

Moshe


2 Answers

EDSunriseSet is an open source and free Objective-C wrapper for the C languages routines created by Paul Schlyter.

Calculation is done entirely by the C-code routines. EDSunrisetSet bridges those calculations to common Cocoa classes (NSDate, NSTimeZone, ...)

like image 168
Rinju Jain Avatar answered Oct 01 '22 02:10

Rinju Jain


I've actually ported the KosherJava Library and plan to make it available soon on GitHub!

Edit:

KosherCocoa is now live on GitHub! If you don't need the hebrew calendar related code, you can delete the "calendar" file. The class files are separated nicely into folders based on the kinds of calculations that they do.

Edit: KosherCocoa us due to be replaced with a modern and more complete update as soon as I can. The above link now points at a legacy repo.

like image 26
Moshe Avatar answered Oct 01 '22 01:10

Moshe