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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:41:01+00:00 2026-05-17T14:41:01+00:00

Initially I thought that using this code + (NSString *)getDayOfTheWeek:(NSDate *)date format:(NSString*)format { NSDateFormatter

  • 0

Initially I thought that using this code

+ (NSString *)getDayOfTheWeek:(NSDate *)date format:(NSString*)format
{
 NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
 dateFormatter.dateFormat = format;
 NSString *formattedDateString = [dateFormatter stringFromDate:date];
 NSLog(@"Des pico je: %@",formattedDateString);
 return formattedDateString;
}
NSDate *now = [NSDate date];
NSString *today = [self getDayOfTheWeek:now format:@"c"]

should return a string with a number for each day, but it gets different results for different regional format settings. (Mon = 1 or Sun = 1) and maybe some variations. don’t know. So is there a common way to get this solution generically for all region date type settings on iPhone easily?

  • 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-17T14:41:01+00:00Added an answer on May 17, 2026 at 2:41 pm

    The “c” is the stand-alone local day of week. Stand-alone means it’s meant to be used without any further date context (as opposed to “e”). And the local day of week is dependent on the locale, i.e. which day does the locale dictate as being the first day of the week. So Friday can be either 5 or 6, depending on the locale.

    To find out which day is the first day of the week you can use [[NSCalendar currentCalendar] firstWeekday].

    But if you want just a string with the name of today’s day, as in “Monday”, “Tuesday”, etc. you can use NSString *today = [self getDayOfTheWeek:now format:@"cccc"];.

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

Sidebar

Related Questions

I initially designed my system following the s# architecture example outlined in this codeproject
I have a modal popup that initially shows some content but expands a div
I have a function I've written that was initially supposed to take a string
Hi I've got a DIV section that has only its title visible initially. What
I'm using an EAGL context and view for my application's normal screen rendering. This
I'm struggling with an AudioQueue audio player I implemented. I initially thought it was
I have some javascript code that is used in a few different pages in
I have to write program that create process using pipe() . My first task
I have developed an app in Honeycomb and I am using fragments. This is
I am using a XML Text reader on a XML file that may contain

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.