Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
January 23, 2018, 09:09:34 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: NSCalendarDate//dateByAddingYears  (Read 1373 times)
mtube
Newbie
*
Posts: 14


Email
« on: April 24, 2010, 11:04:12 PM »

How do I find the right way to use this
NSCalendarDate =iWeeksFromNow;
iWeeksFromNow =[now dateByAddingYears:0
                                                      months:0
                                                           days:(i * 7)
                                                         hours:0
                                                      minutes:0
                                                      seconds:0];
i get a error message 'NSCalendarDate' may not respond to '-dateByAddingYears
i tried looking in the help but it did not have a like format
am using OSX snow leopard
help!!!
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114



« Reply #1 on: April 25, 2010, 08:48:07 AM »

The NSCalendarData class has been deprecated by Apple (and is no longer officially supported).  Try to solve the problem using the NSDate class instead.

Cheers,

Steve Kochan
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 classroomM.com. All rights reserved.