On Feb 24, 2010, at 12:04 pm, Rick Mann wrote: > I'd like to take an NSDate and get a relative day-of-week name. For example, > if today is 2/24, and the NSDate is some time on 2/23, it would be > "Yesterday." If the NSDate were 2/22, it would be "Monday." > > Is there an existing format specifier for this (fully localized, etc)? Or > must I roll my own for this? >
NSDateFormatter > setDoesRelativeDateFormatting: Specifies whether the receiver uses phrases such as “today” and “tomorrow” for the date component. <http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDateFormatter/setDoesRelativeDateFormatting:> mmalc _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
