Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 616019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:16:55+00:00 2026-05-13T18:16:55+00:00

I am trying to do some basic operations with Dates on the iPhone. I

  • 0

I am trying to do some basic operations with Dates on the iPhone. I want to take a string like “2010-02-19” and turn it into a string like “Friday, Feb 19.” The strings I will be receiving will always be in 2010-02-19. Right now, I am running the following code that works, but it produces a warning that says “NSDate may not respond to +dateWithNaturalLanguageString:”

NSDate *date = [NSDate dateWithNaturalLanguageString:scheduled];
NSDateFormatter *df = [[[NSDateFormatter alloc] init] autorelease];
[df setDateFormat:@"EEEE, MMM dd"];

return [df stringFromDate:date];

The code works, but it produces that warning. Should I worry about it, or is this OK on the iPhone. Is there another NSDate initializer that I should be using?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:16:56+00:00Added an answer on May 13, 2026 at 6:16 pm

    +dateWithNaturalLanguageString seems to be only available on the Mac : NSDate Class Reference in Mac Dev Center vs. NSDate Class Reference in iPhone Dev Center

    Also, the documentation says that:

    It may give unexpected results, and
    its use is strongly discouraged

    In the overview section of the class reference you can find the following information:

    NSDate provides several methods to
    interpret and to create string
    representations of dates (for example,
    dateWithNaturalLanguageString:locale:
    and descriptionWithLocale:). In
    general, on Mac OS X v10.4 and later
    you should use an instance of
    NSDateFormatter to parse and generate
    strings using the methods
    dateFromString: and
    stringFromDate:—see NSDateFormatter on
    Mac OS X 10.4 for more details.

    Given that this is only officially available on the Mac, but not on the iPhone, I wouldn’t use it in an iPhone project. Even on the Mac it seems that Apple recommends using an NSDateFormatter instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 537k
  • Answers 537k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There is a difference in the * usage when you… May 17, 2026 at 1:39 am
  • Editorial Team
    Editorial Team added an answer - is only a special character in character classes [...]… May 17, 2026 at 1:39 am
  • Editorial Team
    Editorial Team added an answer Use .height() like this: var result = $("#myDiv").height(); There's also… May 17, 2026 at 1:39 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm trying to implement some basic linear algebra operations and one of these operations
Working on a WinPCap project. Trying to do some basic pointer and memory operations
I'm currently writing some methods that do some basic operations on form controls eg
I'm trying to evaluate the complexity of some basic image filtering algorithms. I was
I'm trying to do some basic queries using the groovy.sql.Sql object, and I'm getting
I am trying to get some basic unit tests up and running on the
I am trying to parse some very basic JSON, but I don't know where
I am trying to clear up some things regarding complexity in some of the
I trying to invoke a web service, which has an Basic HTTP Authentication. I
Thanks to suggestions from a previous question , I'm busy trying out IronPython, IronRuby

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.