Skip navigation.
 
mlRe: dateWithCalendarFormat: problem
FROM : Tito Ciuro
DATE : Sat Jan 25 12:41:58 2003

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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mldateWithCalendarFormat: problem Jeff LaMarche Jan 25, 03:14
mlRe: dateWithCalendarFormat: problem Nicholas Riley Jan 25, 05:52
mlRe: dateWithCalendarFormat: problem Daniel Hedrick Jan 25, 08:02
mlRe: dateWithCalendarFormat: problem Tito Ciuro Jan 25, 12:41