• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: dateWithCalendarFormat: problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dateWithCalendarFormat: problem


  • Subject: Re: dateWithCalendarFormat: problem
  • From: Tito Ciuro <email@hidden>
  • Date: Sat, 25 Jan 2003 12:41:58 +0100

On Saturday, January 25, 2003, at 03:14 AM, Jeff LaMarche wrote:

> Any idea why I would get a "selector not recognized" error when
> calling dateWithCalendarFormat: on an NSCalendarDate?
>
> Here's the error message:
>
> *** -[NSCFDate descriptionWithCalendarFormat:]: selector not recognized
>
> The NSCalendarDate was created earlier like this:
>
> NSCalendarDate *date = [NSCalendarDate calendarDate];

This works for me:

NSCalendarDate *date = [NSCalendarDate calendarDate];
NSString *datestr = [date descriptionWithCalendarFormat:@"%a %m/%d/%y
%I:%M %p"];
NSLog(@"datestr: %@", datestr);

Are you sure you haven't overwritten 'date ' with a NSDate later on in
the code?

-- Tito
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >dateWithCalendarFormat: problem (From: Jeff LaMarche <email@hidden>)

  • Prev by Date: Re: Leaking Memory
  • Next by Date: Re: using registerImageRepClass
  • Previous by thread: Re: dateWithCalendarFormat: problem
  • Next by thread: Talking to mail.yahoo.com from Cocoa program
  • Index(es):
    • Date
    • Thread