• 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: NSCalendarDate formatting error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Copying files
  • Next by Date: Re: Project Builder 1.1.1 won't start
  • Previous by thread: Copying files
  • Next by thread: Re: Project Builder 1.1.1 won't start
  • Index(es):
    • Date
    • Thread