Hey there everyone!
I'm creating an app that needs to run on 10.4 and above. Having a date string that is formatted properly is crucial. When I run my program in 10.5 debug everything is good; I get a date which is exactly how I want it:
Jul 13, 2010 16
the 16 being the hour without the minutes, which I specifically need. Then when I run it in 10.4 I get this:
07/13/10
My code to produce this date looks like this:
NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setDateFormat:@"MMM dd, yyyy HH"];
NSDate *newNow = [[NSDate alloc] init];
NSString *dateString = [format stringFromDate:newNow];
After reading some relevant documentation (link below), it seems like 10.4 has a unique way to to format that is different then 10.3, 10.5 and 10.6. To quote the link:
"The format string uses the format patterns from the Unicode standard (this reference is to version tr35-6 for Mac OS X v10.5; for Mac OS X v10.4 use version tr35-4)."
I've gone through the documentation and it seems like my Unicode format is okay, but I'm still getting this odd result.
Any help?