Mailing Lists: Apple Mailing Lists

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

NSDateFormatter



Hi all,

I experience a strange behavior which I can not explain:

In IB I have 2 text fields with a date formatter attached, set to %b % d, %Y allowing natural language

in my program I simply NSLog both values after I enter a date, in the first text field for example: 01/01/2005
in the second text field 01/05/2005


The NSLog I create with:

      NSLog(@"Date 1: %@",[date1 objectValue]);
      NSLog(@"Date 2: %@",[date2 objectValue]);

looks like this:

Date 1: 2005-01-01 12:00:00 -0700
Date 2: Wednesday, January 5, 2005

No matter which date format I pick in IB, both NSLog outputs are always in a different format.
Could someone please explain this?



Sincerely, Frank Fenn

--

Bright Light Software - http://www.brightlightsoftware.com


_______________________________________________ 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


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.