Re: Getting relative day-of-week name?
Re: Getting relative day-of-week name?
- Subject: Re: Getting relative day-of-week name?
- From: mmalc Crawford <email@hidden>
- Date: Wed, 24 Feb 2010 12:22:56 -0800
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@hidden)
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:
This email sent to email@hidden