Re: Date Format Conversion
Re: Date Format Conversion
- Subject: Re: Date Format Conversion
- From: Andreas Mayer <email@hidden>
- Date: Thu, 22 Jun 2006 18:58:16 +0200
Am 22.06.2006 um 18:11 Uhr schrieb Neto:
because I don't know how to implement the
"checkCurrentSystemDateFormat" or the "checkFirstTwoCharacters"
methods.
See documentation about NSDateFormatter and NSString.
To get the integer value of the first two characters of a string you
could write
int value = [[theString substringToIndex:2] intValue];
Date formatting is a complex problem. For system versions prior to
10.4 support for date formatting was - um - bad. Support in Tiger
seems to be much better. Since I don't have too much experience with
the new date related methods, I suggest you read up on it yourself:
http://developer.apple.com/documentation/Cocoa/Conceptual/
DataFormatting/DataFormatting.html
3. As a last option, I may add a pop up that asks the user to
inform if the date is dd/mm/yy or mm/dd/yy,
I don't know what your target audience is, so I can't say if this is
indeed all you need. But please note that there are a *lot* more date
formats than those two.
Andreas
_______________________________________________
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