Hi All,

I have a 10.4 style date formatter applied to an NSTextFieldCell. I
call setTwoDigitStartDate: (tried with both the epoch date and the
"reference" date) but when I type a date with a two digit year in it sets
the year to 0009 instead of 2009. Am I missing something obvious?
Regards,
Matt

//.h
IBOutlet NSTextFieldCell *transactionDateField; // this outlet *IS* set
correctly in IB

//.m
- (void)awakeFromNib {
NSDate *startDate = [NSDate dateWithTimeIntervalSinceReferenceDate:0];
//NSDate *startDate = [NSDate dateWithTimeIntervalSince1970:0]; // also
tried this
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setFormatterBehavior:NSDateFormatterBehavior10_4];
[dateFormat setDateStyle:NSDateFormatterMediumStyle];
[dateFormat setTwoDigitStartDate:startDate];
[dateFormat setLenient:YES];
 [transactionDateField setFormatter:dateFormat];
}


-- 


Safe, comfortable and satisfied? Please consider supporting some people who
aren't!
I'm riding 100 kilometres to raise funds for refugees!
http://my.e2rm.com/personalPage.aspx?registrationID=750445
_______________________________________________

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