Hi. Given a day-of-week number, what's the best way to get the abbreviated name 
of that weekday? I've tried using NSDateComponents in various ways 
(stand-alone, building off the current date, etc.) to get at it (by using 
NSDateFormatter on the resulting date), but none seem to work. Basically, 
setting the weekday on NSDateComponents seems to do nothing.

Matters are complicated by the fact that two of the three format specifiers for 
weekday name use the "local" weekday number, which can vary by locale.

Any suggestions? I could just roll my own and localize it, but I'd rather just 
use what the OS provides.

The only other thing I can think to do is start with a known date for, say, 
Sunday, and add to that the weekday number I have, and the convert that date to 
a string formatted as a weekday name.

Thanks,

-- 
Rick

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to