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: Nick Zitzmann <email@hidden>
- Date: Sat, 29 Apr 2006 11:43:32 -0600
On Apr 29, 2006, at 1:24 AM, Wade Tregaskis wrote:
The documentation for NSCalendar does not actually say what the
return value means.
Actually, it does. From the description:
"In a calendar, day, week, weekday, month, and year numbers are
generally 1-based, but there may be calendar-specific exceptions.
Ordinal numbers, where they occur, are 1-based."
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..
NSCalendarDate is not NSCalendar. NSCalendarDate predates NSCalendar
by years, and I suspect it may be deprecated in the future, because
the NSCalendar/NSDateComponents/NSDate classes offer most of the same
functionality and are far more powerful than NSCalendarDate when used
together. Right now, the only two things NSCalendarDate have going
for it are (1) backward compatibility, and (2) NSCalendarDate can
encapsulate time zones; NSDate can't.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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