iphone - How To convert int into NSDate format? -


i have taken 2 values 140 & 200 , if add 140+200 = 340 want output of 340 days nsdate format

nscalendar *calendar = [[[nscalendar alloc] initwithcalendaridentifier:nsgregoriancalendar] autorelease]; nsdatecomponents *components = [[[nsdatecomponents alloc] init] autorelease]; [components setday:340];  nsdate *date = [calendar datefromcomponents:components]; 

gives date 340s day of year 0... long ago.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -