Re: NSCalendarDate formatting error
Re: NSCalendarDate formatting error
- Subject: Re: NSCalendarDate formatting error
- From: Lorenzo Puleo <email@hidden>
- Date: Sat, 23 Mar 2002 16:04:57 +0100
>
I am trying to make NSCalendarDate formatted how I want. However the
>
following two lines will crash my app (it just quits as soon as it hits
>
them). I cant seem to see what is wrong, please let me know where I made the
>
mistake.
>
>
[currentDate setCalendarFormat:@"%A-%I:%M"];
>
currentDate = [NSCalendarDate calendarDate];
Hi,
why do you pre-format the NSCalendarDate?
You could get any formatted string whenever you want, as the following code:
NSCalendarDate *today;
NSString *aString;
today = [NSCalendarDate calendarDate];
aString = [today descriptionWithCalendarFormat:@"%d %b %Y, %H:%M"];
I hope this helps.
--
Lorenzo - email@hidden
_______________________________________________
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.