Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDatePicker / NSDatePickerCell



See NSCalendar.h. Given an NSCalendar instance that you've configured with the appropriate Locale and TimeZone, you can use the following methods to convert between an NSDate and corresponding NSDateComponents:

- (NSDate *)dateFromComponents:(NSDateComponents *)comps;
- (NSDateComponents *)components:(NSUInt)unitFlags fromDate:(NSDate *) date;


With the date in component form, you can read and modify its era as desired:

- (NSInt)era;
- (void)setEra:(NSInt)v;


On Sep 15, 2005, at 1:03 PM, SA Dev wrote:
Thanks, Troy:

Is there a way to use NSDatePicker with another control (like an NSMatrix) to specify BC/AD easily? I guess the question is actually "how can I easily 'toggle' a date between BC/AD" ...

 - SADev

On Sep 15, 2005, at 3:53 PM, Troy Stephens wrote:
Is this flag actually implemented in 10.4 or are the docs wrong?

Sorry for the confusion. There's a mention of this in the Tiger AppKit Release Notes:


"NSTimeZoneDatePickerElementFlag and NSEraDatePickerElementFlag have been declared for possible future use, and do not yet have any effect."

-- Troy Stephens Cocoa Frameworks Apple Computer, Inc.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSDatePicker / NSDatePickerCell (From: SA Dev <email@hidden>)
 >Re: NSDatePicker / NSDatePickerCell (From: Troy Stephens <email@hidden>)
 >Re: NSDatePicker / NSDatePickerCell (From: SA Dev <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.