• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDatePicker / NSDatePickerCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDatePicker / NSDatePickerCell


  • Subject: Re: NSDatePicker / NSDatePickerCell
  • From: Troy Stephens <email@hidden>
  • Date: Thu, 15 Sep 2005 13:31:08 -0700

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: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSDatePicker / NSDatePickerCell
      • From: Troy Stephens <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>)

  • Prev by Date: Xcode custom new file templates?
  • Next by Date: Save struct to NSDictionary
  • Previous by thread: Re: NSDatePicker / NSDatePickerCell
  • Next by thread: Re: NSDatePicker / NSDatePickerCell
  • Index(es):
    • Date
    • Thread