Re: First day of the week? Which one?
Re: First day of the week? Which one?
- Subject: Re: First day of the week? Which one?
- From: Wade Tregaskis <email@hidden>
- Date: Sat, 29 Apr 2006 17:24:54 +1000
No, don't, because this returns 1 on my system (Monday), which is
wrong.
Actually, just about everything in NSCalendar, including weekday
enumerations, starts with the number 1 rather than 0.
The documentation for NSCalendar does not actually say what the
return value means. I'm going from NSCalendarDate, which says:
"To retrieve conventional elements of an NSCalendarDate object, use
the ...Of... methods. For example, dayOfWeek returns a number that
indicates the day of the week (0 is Sunday). The monthOfYear method
returns a number from 1 through 12 that indicates the month."
I figure dayOfWeek and firstWeekday should return the same types.
So, 0 is Sunday, 1 is Monday. Whether 7 is valid and what it means,
I don't know... I presume setFirstWeekday: would do a %7 on the input
anyway, so the result is the same, either way..
Wade Tregaskis
ICQ: 40056898
AIM, Yahoo & Skype: wadetregaskis
MSN: email@hidden
iChat & email: email@hidden
Jabber: email@hidden
Google Talk: email@hidden
http://homepage.mac.com/wadetregaskis/
-- Sed quis custodiet ipsos custodes?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden