I am new to the whole iPhone SDK and objective C, but have managed to get three times, two pulled from RSS feed, and one from the iphone.
I currently have: sunrise, sunset and current time set like:
6:51 am //Sunrise
7:36 pm //Sunset
11:34 AM //Current time
I am trying to work out the best approach to find out if its day or night?
Any help on this welcome, thanks in advance.
Use NSDateFormatter to create NSDate objects from your dates.
In NSDate you have:
earlierDate,laterDateandcomparethat you can use.For day time you want:
for night time you want:
Pseudo code 🙂