Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pranavrshah2006

macrumors newbie
Original poster
Nov 26, 2012
1
0
Hello
I am looking to develop an app for calculating no of days between two dates.
Can somebody pls provide me some algo or some reference link or pseudocode?
Thanks:)
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,561
6,059
In addition to NSDate to find the time interval between two dates, you'll also want to use an NSDatePicker so that the user can input two dates:

http://developer.apple.com/library/ios/documentation/uikit/reference/UIDatePicker_Class/

Finally, some basic knowledge about how integer division and modulus work so that you can convert the time interval to seconds, minutes, hours, and days will help... Unless UIKit happens to have a method that does that already built in? I'm not sure which class would hold such a method...
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.