Re: NSDateFormatter
Re: NSDateFormatter
- Subject: Re: NSDateFormatter
- From: Kevin Ballard <email@hidden>
- Date: Tue, 1 Feb 2005 21:35:13 -0500
Make a subclass of NSDateFormatter and override -stringForObjectValue:
to check the object - if it's today, then return @"Today", otherwise,
return the superclass's implementation.
You might also want to support @"Yesterday" and @"Tomorrow" as well.
On Feb 1, 2005, at 9:16 PM, Bertrand Landry Hetu wrote:
I was wondering if there was a way to use NSDateFormatter to format an
NSDate into a string that would say "Today" if NSDate is today or the
usual string if not (just like Mail & Finder)?
I thought setting allowNaturalLanguage to YES would do it but It seems
like it really means that it supports parsing the user's input.
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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