Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: First day of the week? Which one?




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: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >First day of the week? Which one? (From: Stephane <email@hidden>)
 >Re: First day of the week? Which one? (From: Ryan Britton <email@hidden>)
 >Re: First day of the week? Which one? (From: Stephane Sudre <email@hidden>)
 >Re: First day of the week? Which one? (From: email@hidden)
 >Re: First day of the week? Which one? (From: Horst Hoesel <email@hidden>)
 >Re: First day of the week? Which one? (From: Wade Tregaskis <email@hidden>)
 >Re: First day of the week? Which one? (From: Deborah Goldsmith <email@hidden>)
 >Re: First day of the week? Which one? (From: Wade Tregaskis <email@hidden>)
 >Re: First day of the week? Which one? (From: Nick Zitzmann <email@hidden>)
 >Re: First day of the week? Which one? (From: Wade Tregaskis <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.