Re: NSTableColumn Date Format
Re: NSTableColumn Date Format
- Subject: Re: NSTableColumn Date Format
- From: Neto <email@hidden>
- Date: Sat, 17 Jun 2006 00:31:05 -0300
I doing something wrong here, and maybe someone could help.
I reproduced the exact code from the example bellow. My locale is
pt_BR and instead of getting the Output described bellow, I'm getting:
formattedDateString for locale pt_BR: 01/02/01
Not Jan 2, 2001 as I may expect from NSDateFormatterMediumStyle
Nor 2, Jan 2001 as I may expect from my current locale.
Any tips?
NSDateFormatter *dateFormatter =
[[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setDateStyle:NSDateFormatterMediumStyle];
[dateFormatter setTimeStyle:NSDateFormatterNoStyle];
NSDate *date =
[NSDate dateWithTimeIntervalSinceReferenceDate:118800];
NSString *formattedDateString = [dateFormatter stringFromDate:date];
NSLog(@"formattedDateString for locale %@: %@",
[[dateFormatter locale] localeIdentifier],
formattedDateString);
// Output: formattedDateString for locale en_US: Jan 2, 2001
On 16 Jun 2006, at 21:58, mmalcolm crawford wrote:
On Jun 16, 2006, at 5:31 PM, Neto wrote:
In IB I binded formater to that NSTableColumn to %m/%d/%y
The problem is: when the user has another setting at the system
(like d/m/y) the column still shows m/d/y.
How do I set the column to reflect the user's date format?
<http://developer.apple.com/documentation/Cocoa/Conceptual/
DataFormatting/index.html>
mmalc
_______________________________________________
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