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 7950585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:19:14+00:00 2026-06-04T02:19:14+00:00

I am a new to objective C, I am developing a app to determine

  • 0

I am a new to objective C, I am developing a app to determine the date of birth when user gives the year and the number of days. For example if user give 1985 as his/her year of birth and the number of days as 311. his/here date of birth is 1985 November 6. So how to get the November 6 from 311 in 1985 ? Please help

  • 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-06-04T02:19:15+00:00Added an answer on June 4, 2026 at 2:19 am

    You should never have to calculate whether the current year is a leap year or not. Never ever ever. Let the frameworks do that for you. People much more intelligent than you or I have done this for us already, so why on earth would we go about re-inventing this wheel with sub-optimal algorithms that would never account for all of the intricate calendar variations?

    It’s stupid to do this yourself. So don’t:

    NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
    NSDateComponents *startComponents = [[NSDateComponents alloc] init];
    [startComponents setYear:1985];
    [startComponents setDay:311];
    
    NSDate *date = [gregorian dateFromComponents:startComponents];
    
    NSLog(@"endDate: %@", date);
    

    This logs:

    endDate: 1985-11-07 08:00:00 +0000
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im new with objective-c. I have problem with memory leaking when developing iphone app.
I'm developing an iPhone app, and I'm kinda new to Objective-C and also the
i'm new in Objective C, i'm developing an app that play sound on touch
I am relatively new to Objective C/iPhone Development. I am developing a simple app
I'm new to objective-c and at the moment developing a small application. I have
I'm new to developing with xCode and Objective C, and I have a simple
I'm fairly new to Cocoa and Objective-C. Currently I'm developing a fairly basic application
I'm developing simple MVC app in Cocoa/Objective-C. I have a strange issue (or misunderstanding)
I'm developing an application where the user adds new rows to an existing table.
I'm pretty new to Objective-C. I'm developing a Cocoa application. Currently I'm looking for

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.