How to start from sunday?
Opened this issue · 4 comments
DKalachniuk commented
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 commented
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 commented
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 commented
OK. I found how to start from SUNDAY.
need to change two rows :
- comment [weekdays moveObjectFromIndex:0 toIndex:6]; in drawRect method. Now it will start from sunday
- change firstWeekInMonth method in NSDate+convenience. Change [gregorian setFirstWeekday:2]; to [gregorian setFirstWeekday:1];
That's it
xmram commented
Thanks, DKalachniuk. You saved my day!!! :)