Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to start from sunday? #19

Open
DKalachniuk opened this issue Jul 5, 2013 · 4 comments
Open

How to start from sunday? #19

DKalachniuk opened this issue Jul 5, 2013 · 4 comments

Comments

@DKalachniuk
Copy link

I commented this line [weekdays moveObjectFromIndex:0 toIndex:6]; so it shows correct weekdays -from sunday to monday but it shows not correct days right now. Please advise

@tjeerdintveen
Copy link
Owner

I can't fully support this code right now. But you can use the NSDate categories to adjust the calendar types and therefor the dates. You may also want to look into the drawrect method of the calendar to adjust the names of the week.

@DKalachniuk
Copy link
Author

but i need to show correct dates with correct weekdays. I commented [weekdays moveObjectFromIndex:0 toIndex:6]; but it is not enough. Hope for your help in drawRect method

@DKalachniuk
Copy link
Author

OK. I found how to start from SUNDAY.
need to change two rows :

  1. comment [weekdays moveObjectFromIndex:0 toIndex:6]; in drawRect method. Now it will start from sunday
  2. change firstWeekInMonth method in NSDate+convenience. Change [gregorian setFirstWeekday:2]; to [gregorian setFirstWeekday:1];

That's it

@xmram
Copy link

xmram commented Jan 27, 2014

Thanks, DKalachniuk. You saved my day!!! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants