• 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: [NSDate +dateWithNaturalLanguageString] question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSDate +dateWithNaturalLanguageString] question


  • Subject: Re: [NSDate +dateWithNaturalLanguageString] question
  • From: Jamie Phelps <email@hidden>
  • Date: Sun, 13 Jul 2008 10:57:18 -0500

Well, I worked it out using NSCalendarDate's - dateByAddingYears:months:days:hours:minutes:seconds: but I'd still be curious as to why the natural language I was trying to use didn't work...

JP

On Jul 13, 2008, at 10:44 AM, Jamie Phelps wrote:

Hi, all. I searched the archives regarding this method and didn't find anything applicable. Sorry if this has been covered.

Is there some list of acceptable strings for +dateWithNaturalLanguageString:? I am trying to set my Core Data entity's expirationDate attribute's default value to "four months from today" but it just returns the current date each time. Here are the strings I have tried:

"in four months"
"four months from now"
"four months from today"

I also tried the same strings in -awakeFromInsert to no avail.

This is on Leopard so perhaps it behaves differently than in Tiger? If anyone has an idea or direction to where I could find a list of acceptable strings, I'd greatly appreciate it.

Thanks!
JP

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [NSDate +dateWithNaturalLanguageString] question
      • From: Keith Duncan <email@hidden>
References: 
 >[NSDate +dateWithNaturalLanguageString] question (From: Jamie Phelps <email@hidden>)

  • Prev by Date: Responder Chain Patching
  • Next by Date: Re: [NSDate +dateWithNaturalLanguageString] question
  • Previous by thread: [NSDate +dateWithNaturalLanguageString] question
  • Next by thread: Re: [NSDate +dateWithNaturalLanguageString] question
  • Index(es):
    • Date
    • Thread